C++ Functions Quiz Questions and Answers - 2

Question: 6

The return type of the function prototype float power (float,.int) is ___

(A) Int

(B) Float

(C) Double

(D) Char

Ans: B

Float

Question: 7

The lifetime of a ___ variable is the life time of a program.

(A) Global scope

(B) Local scope

(C) File scope

(D) Function scope

Ans; C

File scope

Question: 8

In call by value method, the flow of data is always from the ___ statement to the function definition.

(A) Call

(B) Return

(C) Function

(D) Go to

Ans: A

Call

Question: 9

A block of code begins and ends with ___

(A) {}

(B) []

(C) ()

(D) {]

Ans: A

{}

Question: 10

The scope of any variable used in the entire program is ___

(A) Class

(B) Function

(C) File

(D) Local

Ans: C

File

Related Questions