Skip to content

Instantly share code, notes, and snippets.

@NicolasFrancaX
Created April 25, 2016 14:49
Show Gist options
  • Save NicolasFrancaX/0eaad1f8c2a556e97dbaac9dd95e9203 to your computer and use it in GitHub Desktop.
Save NicolasFrancaX/0eaad1f8c2a556e97dbaac9dd95e9203 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main() {
int i = 5;
// Usando i++
printf("%d\n", i++); // => Primeiro incremento
printf("%d\n", i++); // => Segundo incremento
printf("%d\n", i);
printf("%d\n", i);
i = 5;
printf("\n---------------\n\n");
// Usando ++i
printf("%d\n", ++i); // => Primeiro incremento
printf("%d\n", ++i); // => Segundo incremento
printf("%d\n", i);
printf("%d\n", i);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment