The compiler understands the statement expression a–b by taking off as much operators as it makes sense to a variable. So (a++) is taken as a parameter and then the expression becomes 8-8 which in turn gives the x value as 0. Thus the output value is 0.
a=7; b=8; x=a++-b; printf(“%d”, x ); What does this code give as output?
Category: Embedded Systems Interview Questions.