Exam 6: User-Defined Functions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following function prototypes is valid?

(Multiple Choice)
4.9/5
(37)

Given the following function prototype: int myFunc(int, int);, which of the following statements is valid? Assume that all variables are properly declared.

(Multiple Choice)
4.7/5
(34)

____________________ parameters are useful in three situations: • When the value of the actual parameter needs to be changed • When you want to return more than one value from a function • When passing the address would save memory space and time relative to copying a large amount of data

(Short Answer)
4.8/5
(44)

The output of the statement: cout << pow(2.0, pow(3.0, 1.0)) << endl; Is ____.

(Multiple Choice)
4.9/5
(39)

A variable or expression listed in a call to a function is called the ____.

(Multiple Choice)
4.8/5
(41)

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

(True/False)
4.8/5
(46)

The statement: return 2 * 3 + 1, 1 + 5; returns the value ____.

(Multiple Choice)
4.9/5
(46)

Given the function prototype: double testAlpha(int u, char v, double t); which of the following statements is legal?

(Multiple Choice)
4.8/5
(27)

The heading of the function is also called the ____.

(Multiple Choice)
4.7/5
(41)

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

(Multiple Choice)
4.7/5
(34)

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

(Multiple Choice)
4.9/5
(40)

In C++, :: is called the ____________________.

(Short Answer)
4.7/5
(33)

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

(Short Answer)
4.8/5
(37)

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

(Short Answer)
4.9/5
(36)

Functions that do not have a return type are called ____ functions.

(Multiple Choice)
4.8/5
(32)

The statement: return 8, 10; returns the value ____.

(Multiple Choice)
4.9/5
(40)

Given the function prototype: float test(int, int, int); Which of the following statements is legal?

(Multiple Choice)
4.8/5
(39)

If a function needs to return more than one value, as a rule of good programming style, you should change it to a(n) ____________________ function and use the appropriate reference parameters to return the values.

(Short Answer)
4.9/5
(34)

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

(Short Answer)
4.8/5
(41)

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

(True/False)
4.9/5
(36)
Showing 21 - 40 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)