#include<stdio.h>
main()
char a,m;
printf("1st\n");
scanf("%c",&a);
printf("2nd\n");
scanf("%c",&m);
chandan127
0
Newbie Poster
Recommended Answers
Jump to PostIt's not skipping input, you already supplied it. Say you enter 1 for the 1st number. What you really enter is:
'1' and '\n'.
The '1' is read into 'a' and the '\n' remains in the stream. When calling scanf() a next time it reads the newline character that was …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.