Object Oriented Programming in C++ MCQ with Answers Pdf - 1

Question: 1

A structure is a data type in which

(A) Elements can be of different type.

(B) Each element must have the same type.

(C) Each element must be of pointer type.

(D) None of above

Ans: A

Elements can be of different type.

Question: 2

Preprocessor does not which one of the following?

(A) Macro expansion

(B) Conditional compilation

(C) Loading include file

(D) Type checking

Ans: A

Macro expansion

Question: 3

Which of the following statement is true about continue statement?

(A) It can be used in conjunction with switch statement.

(B) It terminates the loop.

(C) It terminates the current iteration.

(D) None of above

Ans: C

It terminates the current iteration.

Question: 4

Union differs from structure in the following way

(A) Only one member can be used at a time.

(B) Unions cannot have more than two members.

(C) Union initializes all members as structure.

(D) All members are used at a time.

Ans: A

Only one member can be used at a time.

Question: 5

Which of the following statement is true about register storage class?

(A) Variable always stored in processor registers.

(B) Can only be used with integral data types and pointers.

(C) Variable takes initial value 0 if not initialized.

(D) None of above

Ans: B

Can only be used with integral data types and pointers.

Related Questions