
October 1st, 2012, 05:39 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 1
Time spent in forums: 15 m 43 sec
Reputation Power: 0
|
|
|
C Increment Problem
I guessed how it worked in Visual C++ but didn't understand the operations in case of 1st type output. Help someone!
Code:
#include <stdio.h>
int main()
{
int i=5;
printf("%d %d %d %d \n",i,i++,++i,i++);
printf("%d \n",i);
return 0;
}
/* output in g++ and codeblocks
8 7 8 5
8
output in Microsoft Visual C++ 6.0
6 6 6 5
8
*/
|