C Programming - Control Instructions - Discussion
Discussion Forum : Control Instructions - Find Output of Program (Q.No. 19)
19.
What will be the output of the program?
#include<stdio.h>
int main()
{
char j=1;
while(j < 5)
{
printf("%d, ", j);
j = j+1;
}
printf("\n");
return 0;
}
Discussion:
24 comments Page 3 of 3.
Nellaiappan N said:
9 years ago
Thanks for your answer @Padhu.
Jat said:
3 years ago
Anyone, explain the meaning of %d in this printf("%d, ", j).
Shashank Mishra said:
2 years ago
How can be char j =1?
1 is an integer so j should be int datatype.
1 is an integer so j should be int datatype.
Dev said:
12 months ago
Here, it will be int i=1.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers