Skip to content

Instantly share code, notes, and snippets.

@phaya

phaya/plusplus.c Secret

Last active Oct 23, 2018
Embed
What would you like to do?
¿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;
}
@javierdarna
Copy link

javierdarna commented Nov 10, 2013

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

@alozanousa
Copy link

alozanousa commented Oct 23, 2018

5

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