What is o/p printed when i/p is =1 2 3
'scanf' returns the number of items successfully read
so
3
-1-2-3
-1- -2 (By printf("\n-%c-%c-%c",x,y,z);)
Do you mean -1-2-3 ?
Also why is the output 3 here?
Answer will be: 3 (By printf("%d",scanf("%c%c%c",&x,&y,&z);)
64.3k questions
77.9k answers
244k comments
80.0k users