interview questions

VARIABLES AND DATATYPES

 

Basic Interview Question in a language:

the given below Collection of real time Basic C language Interview Question and answers.

 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};

Ans:d

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

Ans:a

12. What is the output of the following program?

 a) 30,40

 b) 30,2

 c) 2,20

 d) 20,2.000

Ans:b

13. What is the size of integer?

 a) 2 bytes

 b) 4 bits

 c) 8 bytes

 d) 8 bytes

Ans:a

14. What will be the output of the program?

 a) 10 , -1073741824

 b) 10, 15.0

 c) none of above

<inputname=”answers1″ type=”checkbox” value=”50″ > d) 12, -78695

Ans:a

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

 a) long int

 b) double

 c) double int

 d) unsigned char

Ans:c

16. What is the output of the following program?

 a) 0.5, 30

 b) 30,2.000000

 c) 3.0, 0.5

 d) 0.3, 5

Ans:b

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

 a) 2

 b) 1

 c) 4

 d) 8

Ans:d

18. What is the output of following program?

 a) 2,4,1

 b) 4,4,1

 c) 4,2,2

 d) 2,4,2

Ans:b