It
discards unwanted white space.
A white-space character in the control string causes scanf() to skip over one or more leading white-space characters in the input stream.
int main()
{
char ch,ch1;
printf("Enter two chars : ");
scanf("%c\n%c",&ch,&ch1);
printf("\n%c\n%c",ch,ch1);
return 0;
}
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
Offline 6,527 posts
since Oct 2008