The following code line behaves strange...Could anyone of you help in understanding this out....
I gave an extra space " " in the scanf statment after "%s".Code:char a; printf("\nEnter a string:"); scanf("%s ",a); printf("\nAccepted String is :%s",a);
The output behaves as follows:
Enter a String:abcdef
Accepted String is :abcdef
Although I press enter key after entering the string when prompted...it is waiting for me to give one more character. After entering an extra character in 2nd line, then the output is being displayed....
Kindly help me out...