Filters
Question type

Study Flashcards

In C++, a function prototype is the function heading without the body of the function.

A) True
B) False

Correct Answer

verifed

verified

If a formal parameter is a nonconstant reference parameter, during a function call, its corresponding actual parameter must be a(n) ____________________.

Correct Answer

verifed

verified

A function ____________________ is a function that is not fully coded.

Correct Answer

verifed

verified

Given the following function: int strange(int x, int y) { if (x > y) \quad return x + y; else \quad return x - y; } What is the output of the following statement? cout << strange(4, 5) << endl;


A) -1
B) 1
C) 9
D) 20

E) None of the above
F) C) and D)

Correct Answer

verifed

verified

The ____________________ of a function consists of the function name and its formal parameter list.

Correct Answer

verifed

verified

Using functions greatly enhances a program's readability because it reduces the complexity of the function main.

A) True
B) False

Correct Answer

verifed

verified

A(n) ____________________ parameter s a formal parameter that receives a copy of the content of the corresponding actual parameter.

Correct Answer

verifed

verified

Which statement below about prototypes and headers is true?


A) Parameter names must be listed in the prototype, but not necessarily in the header.
B) Prototypes end with a semicolon, but headers do not.
C) Headers should come before prototypes.
D) Headers end with a semicolon, but prototypes do not.

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

Stream variables (for example, ifstream and ofstream) should be passed by ____________________ to a function.

Correct Answer

verifed

verified

The output of the statement: cout << pow(3.0, 2.0) + 5 << endl; is ____.


A) 11.0
B) 12.0
C) 13.0
D) 14.0

E) A) and B)
F) C) and D)

Correct Answer

verifed

verified

Showing 41 - 50 of 50

Related Exams

Show Answer