Exam 6: User-Defined Function

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

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

Free
(True/False)
4.8/5
(37)
Correct Answer:
Verified

True

The standard header file for the abs(x)function is ____.

Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
Verified

A

Assume the following. ​ ​ Assume the following. ​ ​   The output of the statement: ​ Cout << static_cast<int>(tolower('B')) << endl; ​ Is ____. The output of the statement: ​ Cout << static_cast<int>(tolower('B')) << endl; ​ Is ____.

Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
Verified

D

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

(Multiple Choice)
4.8/5
(36)

Given the following function prototype: ​ Double tryMe(double, double); ​ Which of the following statements is valid? Assume that all variables are properly declared.

(Multiple Choice)
4.7/5
(38)

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

(Multiple Choice)
4.8/5
(38)

A function prototype is ____.

(Multiple Choice)
4.9/5
(37)

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

(Multiple Choice)
4.8/5
(35)

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

(Short Answer)
4.9/5
(25)

The heading of the function is also called the ____.

(Multiple Choice)
4.9/5
(36)

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

(True/False)
4.8/5
(28)

What value is returned by the following return statement? What value is returned by the following return statement?

(Multiple Choice)
4.8/5
(35)

The statement: return 37, y, 2 * 3; returns the value ____.

(Multiple Choice)
4.8/5
(31)

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.8/5
(39)

____________________ 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.7/5
(45)

Assume that all variables are properly declared. The following statement in a value-returning function is legal. Assume that all variables are properly declared. The following statement in a value-returning function is legal.

(True/False)
4.8/5
(42)

Which of the following function prototypes is valid?

(Multiple Choice)
4.8/5
(38)

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

(Short Answer)
4.8/5
(39)

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

(True/False)
4.9/5
(38)

When you attach & after the dataType in the formal parameter list of a function, the variable following that dataType becomes a(n) ____________________ parameter.

(Short Answer)
4.8/5
(34)
Showing 1 - 20 of 41
close modal

Filters

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