Created
April 25, 2016 14:49
-
-
Save NicolasFrancaX/0eaad1f8c2a556e97dbaac9dd95e9203 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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