#include #include main() { char ch,name[20]; int i=0; clrscr(); printf(\"Enter a string:\"); while((ch=getch())!=
The actual meaning of \n is \r+\n. getch() function reads a character from the keyboard. It does not echo it and does not wait for next character. So whenever we enter \n character getch() function reads \r character only.
\n
\r
getch()