problem with input

printf("%d",scanf("%c%c",&a,&b));
why it is not taking two inputs???
man wrote:
c
Matches a sequence of characters whose length is specified by the maximum field width (default 1); the next pointer must be a pointer to char, and there must be enough room for all the characters (no terminating null byte is added).
The usual skip of leading white space is suppressed. To skip white space first, use an explicit space in the format.


Edit: It is taking two input, as printf() should be telling you.
Last edited on
Topic archived. No new replies allowed.