Saturday, August 6, 2011

Question About C program?

First the Logical OR has the left-to-right precedence. so you increase i to get i =-2. since next is an 'OR' statement, and you're not comparing ++i with anything, so ++i is true, it won't look at the second expression on the right of OR which increments j,k; thus j and k retains their original values. Then, since the logical test is true, the test return "1", which is then assigned to m, m gets the value of 1. It is, since 'True OR ANY' is 'true', the right side of the OR Expression is considered as DON'T CARE, thus not evaluated.

No comments:

Post a Comment