2_2_interview questions

VARIABLES AND DATATYPES

Multiple Choice Questions

10. Which of following is valid enumeration data type?

 a) enum Month{jan=0,feb,march=4,april,}

 b) enum Month[jan=0,feb,march=4,april,]

 c) enum month[Jan, Feb, March];

 d) enum month{Jan=0, Feb, March};

11. What is the range of unsigned integer?

 a) 0 to 65535

 b) -2,147,438,648 to 2,147,438,648

 c) 0 to 4,294,967,295

 d) -32768 to 32767

12. What is the output of following program?

 a) Every smallest individual Unit

 b) Array of characters

 c) Basic building blocks in a program

 d) Pre-defined words

13. What is the size of integer?

 a) 2 bytes

 b) 4 bits

 c) 8 bytes

 d) 8 bytes

14. What will be the output of the program?

 a) 10 , -1073741824

 b) 10, 15.0

 c) none of above

 d) 12, -78695

15. Which one of the following is an invalid Data Type?

 a) long int

 b) double

 c) double int

 d) unsigned char

16. What is the output of following program?

 a) 0.5, 30

 b) 30,2.000000

 c) 3.0, 0.5

 d) 0.3, 5

17. How many bytes are occupied by double precision floating-point?

 a) 2

 b) 1

 c) 4

 d) 8

18. What is the output of following program?

 a) 2,4,1

 b) 4,4,1

 c) 4,2,2

 d) 2,4,2