Skip to content

Instantly share code, notes, and snippets.

@Tonkpils
Created December 29, 2012 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tonkpils/4407806 to your computer and use it in GitHub Desktop.
Save Tonkpils/4407806 to your computer and use it in GitHub Desktop.
++ what?
int main(void) {
int i = 0;
int x = i++;
//This will print i: 1 x: 0
printf("i: %d x: %d", i, x);
int i = 0;
int x = ++i;
//This will print i: 1 x: 1
printf("i: %d x: %d", i, x);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment