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

Question: 6

The storage class controls

(A) Scope of a variable

(B) Life time of a variable

(C) Both a and b

(D) None of above

Ans: C

Both a and b

Question: 7

Which of the following is not a valid reason for using functions?

(A) They use less memory than repeating the same code.

(B) They keep different program activities separate.

(C) They run faster.

(D) They keep variables safe from other parts of the program.

Ans: C

They run faster.

Question: 8

The C language provides a way to access contents of a file from a program using

(A) System calls

(B) Library function

(C) Both a and b

(D) None of above

Ans: B

Library function

Question: 9

The continue statement is used to

(A) Continue execution of the program error occurs.

(B) Exit from the outermost block even it is used in the innermost block.

(C) Exit the block of loop statement.

(D) Continue the next iteration of the loop statement.

Ans: D

Continue the next iteration of the loop statement.

Question: 10

The operators exclusively used with pointers are

(A) * and /

(B) & and *

(C) & and ^

(D) * and +

Ans: B

& and *

Related Questions