+ 2
Find the output
#include<stdio.h> int main() { int a, b = 10; a = -b--; printf("a = %d, b = %d", a, b); return 0; }
2 Respuestas
+ 6
Just use the sololearn's Code Playground to get the output.
+ 4
In case you already know the output but you are just confused about it:
b-- is postdecrement, i.e.
at first the negative value of b is assigned to a and afterwards b is decremented
if it was
a = -(--b)
the output for a would be -9