0
#include <stdio.h> int main() { int x=4,y,z; y=--x; z=x--; printf("%d",x); return 0; } output value and why ??
#include <stdio.h> int main() { int x=4,y,z; y=--x; z=x--; printf("%d",x); return 0; }
2 Réponses
+ 4
ahh, how bigger your balls are by posting the whole code in the title, now the forum looks ridiculous
the output would be 2 since you're decrementing x,
y and z doesn't have any initial value stored
+ 1
y = --x; // now x = 3
z = x--; // next time x = 2
So
printf gives 2