# 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

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

## Related Posts

• Basic Data Structures » Exercise - 15. What is the output of the following statement : printf (“%-3d”,12345); (A) 1 2 3 (B) -1 2 3 (C) 1 2 3 4 5 (D) 12
Tags: basic, data, structures, exercise, printf, computer, science
• Basic Data Structures » Exercise - 19. A single character input from the keyboard can be obtained by using the function. (a) printf ( ) (b) scanf ( ) (c) putchar ( ) (d) getchar ( )
Tags: basic, data, structures, exercise, printf, computer, science
• Basic Data Structures » Exercise - 18. If an integer needs two bytes of storage, then the maximum value of a signed integer is : (a) 216-1 (b) 215-1 (c) 216 (d) 215
Tags: basic, data, structures, exercise, computer, science
• Basic Data Structures » Exercise - 17. Literal means : (a) a string (b) a string constant (c) a character (d) an alphabet
Tags: basic, data, structures, exercise, computer, science
• Basic Data Structures » Exercise - 16. If the variables i, j and k are assigned the values 5,3 and 2 respectively, then the expression i = j + ( k + + = 6 ) + 7 (a) gives an error message (b) assigns a value 16 to i (c) (d) assigns a value 19 to i
Tags: basic, data, structures, exercise, computer, science