ya dhanulakshmi is write
actually your program is working correctly it do takes the name and store it in d array
well getch() is a funtion which waits for a character to be input but it doesnot displays it on outputscreeen
whereas getchar takes the character and displays it in d screen
thats it
hope u understend the problem