Quiz 8, Chapter 6

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

If the formal parameter list of a function is empty, the parentheses after the function name are not needed.

False

The execution of a return statement in a user-defined function terminates the program.

False

The following return statement returns the value 10. return 10, 16;

False

The function main is always compiled first, regardless of where in the program the function main is placed.

False

What value is returned by the following return statement? int x = 5; return x + 1;

6

To use the predefined function tolower, the program must include the header file ____.

<cctype>

Which of the following function prototypes is valid?

int funcExp(int x, float v);

Which of the following function prototypes is valid?

int funcTest(int, int, float);

A(n) ____________________ parameter is a formal parameter that receives the location (memory address) of the corresponding actual parameter.

reference

A variable for which memory remains allocated as long as the program executes is called a(n) ____________________ variable.

static

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

stub

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

value

Which statement below about prototypes and headers is true?

Prototypes end with a semicolon, but headers do not.

Assume that all variables are properly declared. The following statement in a value-returning function is legal. if (x % 2 == 0) return x; else return x + 1;

True

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

True

Once you write and properly debug a function, you can use it in the program (or different programs) again and again without having to rewrite the same code repeatedly.

True

The data type of a variable in a return statement must match the function type.

True

The following function heading in a C++ program is valid: int funcExp(int u, char v, float g)

True

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

True

A variable for which memory is allocated at block entry and deallocated at block exit is called a(n) ____________________ variable.

automatic


Ensembles d'études connexes

Health Insurance Policy Underwriting Issuance, and Delivery

View Set

Real Estate U Texas Real Estate Finance(6)

View Set

LEGAL: Management and Leadership/Ethical NCLEX questions

View Set

NFSC 320 Understanding Obesity Exam 3

View Set

Content Exam subtest 1 (Language and Literacy)

View Set

chapter 18 cardiovascular system

View Set

Management practice assessment **STUDY**

View Set