SELF
Exam
Programming
What the below statement will print if a=10
printf("%d %d",a, !a++);
Read Solution (Total 2)
-
- output will be: 11 0
first !a++ will be executed but it will print in output after a get printed
so a++ will increase the value of a then a's value will be 11 but not(!) sign will print it as false(0), so 11 0 will get printed. - 11 years agoHelpfull: Yes(1) No(2)
- Values in the function get passed from right to left. First !a++ get processed which pass zero as argument and make 'a' equal to 11
- 4 years agoHelpfull: Yes(0) No(0)
SELF Other Question