Last active
December 19, 2015 11:29
-
-
Save bongtrop/5947724 to your computer and use it in GitHub Desktop.
Test in numer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int a=0,i=2; | |
int test[4][2]; | |
a+=i; | |
test[0][0]=a; | |
test[0][1]=i; | |
a=0;i=2; | |
a=+i; | |
test[1][0]=a; | |
test[1][1]=i; | |
a=0;i=2; | |
a=++i; | |
test[2][0]=a; | |
test[2][1]=i; | |
a=0;i=2; | |
a=i++; | |
test[3][0]=a; | |
test[3][1]=i; | |
printf ("[a+=i] = a(%d), i(%d)\n[a=+i] = a(%d), i(%d)\n[a=++i] = a(%d), i(%d)\n[a=i++] = a(%d), i(%d)\n",test[0][0],test[0][1],test[1][0],test[1][1],test[2][0],test[2][1],test[3][0],test[3][1]); | |
return 0; | |
} | |
/* | |
Result : | |
[a+=i] = a(2), i(2) | |
[a=+i] = a(2), i(2) | |
[a=++i] = a(3), i(3) | |
[a=i++] = a(2), i(3) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment