C Programming - Input / Output - Discussion
Discussion Forum : Input / Output - Point Out Errors (Q.No. 2)
2.
Point out the error in the program?
#include<stdio.h>
int main()
{
char ch;
int i;
scanf("%c", &i);
scanf("%d", &ch);
printf("%c %d", ch, i);
return 0;
}
Discussion:
23 comments Page 3 of 3.
Pratham said:
1 decade ago
You will not get a chance to supply a character for 2nd scanf().
Pooja said:
5 years ago
I couldn't get the answer can you explain properly?
(1)
Rutuja Revadekar said:
4 years ago
I thought the error was in printf statement.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers