|
C Programming Reference >> C Programming Reference Question Bank >> 19/07/07 - 560 Views - Ratings : Question - What will be the output of the following code and why? #include <stdio.h> Value of of x = 7 and Value of y = 49 Explanation - Not a very tough question. Important thing to note that in any expression pre increment operator has a higher prority than arithemetic operator as a result value of x is increment is first two times then value of y is evaluated. So y = 7*7 = 49. This question will result in same output for most of the compilers, but some rare compiler may produce an entire diffrenent parse tree resulting in an undefined result. Reader Comments -
|
||||