Assignment 2(Trace output) Sem-II
Assignment 2 ( Trace Output) 1) What will be output of the following program? #include <stdio.h> int main(){ int x; x=10,20,30; printf( "%d" ,x); return 0; } Explanation: Precedence table: Operator Precedence Associative = More than , Right to left , Least Left to right Since assignment operator (=) has more precedence than comma operator .So = operator will be evaluated first than comma operator. In the following expression x = 10, 20, 30 First 10 will be assigned to x then comma operator will be evaluated. ...