Basic Data Structures – 10

10. In the following code fragment

int x, y = 2, z, a;
x=(y*=2) + (z=a=y);
printf (‘%d’,x);

(a) prints 8
(b) prints 6
(c) prints 6 or 8 depending on the compiler
(d) is syntactically wrong 

Answer : (a)

Explanation : No answer description available for this question. Let us discuss.

Be a Part of The New & Next

MCQs fb  MCQs G+

Share the Knowledge

Leave a Reply

Your email address will not be published. Required fields are marked *

Copy Protected by Chetan's WP-Copyprotect.