Object Oriented Programming MCQ Questions and Answers Pdf - 2

Question: 6

_____ of variables declared within a function is extended to the function block and all sub blocks therein.

(A) Class scope

(B) File scope

(C) Local scope

(D) Function scope

Ans: D

Function scope

Question: 7

_____ functions copies source to target string.

(A) Stcp ()

(B) Scpy ()

(C) Str ()

(D) Strcpy ()

Ans: D

Strcpy ()

Question: 8

_____ function returns the number of character stored in the array.

(A) Strlength ()

(B) Stlen ()

(C) Str ()

(D) Strlen ()

Ans: D

Strlen ()

Question: 9

Which of the following is NOT true, related to functions?

(A) The default value for an argument can be given in between the argument list.

(B) The default value in the formal parameters can be given in the form of variable initialization.

(C) The actual parameters can be passed only as variables to formal parameters of reference type.

(D) The actual parameters can be passed in the form of constants to the formal parameters of value type.

Ans: A

The default value for an argument can be given in between the argument list.

Question: 10

_____ are user defined named entities of memory locations that can store data.

(A) Char

(B) Data

(C) Constant

(D) Variables

Ans: D

Variables

Related Questions