Vidyalelo
C Programming · Q49

Operators and Expressions

Programming · C Programming · question 49

Q49

Choose the correct output for the following program. #include void main() int a=10, b=11, c=13, d; d = (a=c, b+=a, c=a+b+c); printf("%d %d %d %d", d, a, b, c);

A.
50, 13, 11, 13
B.
50, 13, 24, 50
Answer
C.
13, 10, 24, 50
D.
50, 13, 24, 13
E.
13, 13, 24, 13

Answer: Option B

Solution

Answer: Option B
Solution:

For any comma separated expression the outcome is the right most part.