Basic Data Structures – 1 – 2

6. 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
(b) assigns a value 18 to i
(d) assigns a value 19 to i 

Answer
Answer : (a)

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

7. Literal means :

(a) a string
(b) a string constant
(c) a character
(d) an alphabet

Answer
Answer : (b)

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

8. 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

Answer
Answer : (b)

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

9. A single character input from the keyboard can be obtained by using the function.

(a) printf ( )
(b) scanf ( )
(c) putchar ( )
(d) getchar ( )

Answer
Answer : (d)

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

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
Answer : (a)

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

1 2

Share the Knowledge

MORE INFORMATION
GATE Total InfoGATE 2020 BooksFree Notes
IES Total InfoIES 2020 BooksFree Mock tests
JAM Total InfoJAM 2020 BooksEngg Diploma
PSUs Total InfoM Tech Total InfoUGC NET Total Info
Copy Protected by Chetan's WP-Copyprotect.