Give output of the following and explain
int a = 5 ;
if ( a++<7 || ++a<100)
Sop(a);
Answers
Answered by
1
First a++ a value is 10 then ++a a value is 11 that is substituted in expr to b=11+11=22 then a post increment is performed to make value of a to 12.....coming to printf compiler is right associative so first fourth value that is ++a is evaluated sets a value to 13 then a and then a++ wil be printed same value then a value is set to 14 then b gets printed.....
Similar questions