Home
MCQs
C programming language MCQs
Variables
C programming language MCQs

C programming language MCQs - Variables

The memory locations have names that are known as variables. These memory locations can have character, integer, and real constants in them. In any programming language, the variables are dependent on the specific type. Each variable type can have the same constant. These variables and types are important to know before starting to learn c programing language.

1. Which type of result will be returned after performing an arithmetic operation between an integer and an integer?

A. Character

B. Integer

C. Real

D. Null

Answer: B

2. Which type of result will be returned after performing an arithmetic operation between a real and a real?

A. Character

B. Integer

C. Real

D. Null

Answer: C

3. Which type of result will be returned after performing an arithmetic operation between an integer and an real?

A. Character

B. Integer

C. Real

D. Null

Answer: C

4. What will be result of following (5/2) in C programing language?

A. 2.5

B. 2

C. 3

D. 1

Answer: B

5. What will be result of following (5.0 / 2) in C programing language?

A. 2.5

B. 2

C. 3

D. 1

Answer: A

6. What will be result of following (5 / 2.0) in C programing language?

A. 2.5

B. 2

C. 3

D. 1

Answer: A