What will be the output of the following code? Ankur Kulhari October 7, 2016 #include < stdio.h > void main() { int i=5; printf("%d,%d,%d,%d,%d", i++,i--,++i,--i,i); getch(); } Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window) Related
Raju PalOctober 11, 2016 at 12:08 am There is a mistake in writing printf() statement. Because %d does not separated by comma(,). If we consider it correct, then the output would be different on different compilers. The output of above program would be 4 5 5 5 5 for explanation and detailed description please refer following link. http://bit.ly/2d3bQZM Reply
Comments 1
There is a mistake in writing printf() statement. Because %d does not separated by comma(,).
If we consider it correct, then the output would be different on different compilers. The output of above program would be
4 5 5 5 5
for explanation and detailed description please refer following link.
http://bit.ly/2d3bQZM