Skip to content

Instantly share code, notes, and snippets.

@phaya

phaya/plusplus.c Secret

Last active October 23, 2018 23:16
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 phaya/008902243475ee03da37 to your computer and use it in GitHub Desktop.
Save phaya/008902243475ee03da37 to your computer and use it in GitHub Desktop.
¿Cuál es el resultado correcto en esta asignación? ¿5 ó 6?
#include <stdio.h>
int main() {
int i = 5;
i = i++;
printf("%d\n", i);
return 0;
}
@albert101
Copy link

6

@javierdarna
Copy link

Es como escribir i=i=i+1, luego es 6

@alozanousa
Copy link

5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment