guys.... just give input a stream of characters as: a a a a a a a a a
a a a   <---(press enter)

for second  case input as:  c d e f g h i j b <-----(press enter)
and see the difference. (I know that printf() is line buffered. So
why....?)

1.printf() shows 'a'   one time only.

2.here it shows characters entered exactly until program reads 'b'.


On Jul 20, 6:49 pm, akash_mbm <vikaskumarsi...@gmail.com> wrote:
> void main()
> {
>      char a,b,c;
>
>      scanf("%c%c%c",&a,&b,&c);
>      printf("\n%c %c %c\n", a,b,c);
>
> }
>
> ............................
> You may figure out from the above test code whats happening while
> character input.
>
> Its taking '\r' too as a character input as in your case 1st, which is
> not the same in 2nd case

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to