Programming Languages
C
Objective
Mar 08, 2013
What will be output of following c code?
#include<stdio.h>
int main(){
int x=123;
int i={
printf("c" "++")
};
for(x=0;x<=i;x++){
printf("%x ",x);
}
return 0;
}
Detailed Explanation
First printf function will print: c++ and return 3 to variable i.
For loop will execute three time and printf function will print 0, 1, 2 respectively.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts