+ 1
C code
https://code.sololearn.com/c4a88vG1plL0/#c Can anyone explain me how the output comes??
2 odpowiedzi
+ 3
Val++ has increment the value from 10 to 11 thats why when function call made it uses value 11 and return 11*11*11 which is 1331
+ 3
Having a global variable like this puts you into trouble if there was another variable named `val` somewhere in the main like so
int val = 20;
val=10;
funct();
val++;
printf("%d",funct());