C Programming - Expressions - Discussion
Discussion Forum : Expressions - Find Output of Program (Q.No. 9)
9.
What will be the output of the program?
#include<stdio.h>
int main()
{
int i=3;
i = i++;
printf("%d\n", i);
return 0;
}
Discussion:
71 comments Page 8 of 8.
Subhajyoti said:
2 decades ago
i is initialised a value 3,which is again assigned to i as the post decrement operator will be executed after completion of the statement.after completion of the statement i value increases to 4 which will be the output.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers