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.7/5
(79)
Correct Answer:
Verified

True

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

Free
(Multiple Choice)
4.9/5
(67)
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
(76)
Correct Answer:
Verified

D

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

(Multiple Choice)
4.8/5
(88)

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
(69)

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

(Multiple Choice)
4.8/5
(83)

A function prototype is ____.

(Multiple Choice)
5.0/5
(78)

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

(Multiple Choice)
4.8/5
(74)

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

(Short Answer)
4.9/5
(78)

The heading of the function is also called the ____.

(Multiple Choice)
4.9/5
(77)

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

(True/False)
4.8/5
(70)

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

(Multiple Choice)
4.8/5
(61)

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

(Multiple Choice)
4.9/5
(74)

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
(90)

____________________ 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
(87)

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
(87)

Which of the following function prototypes is valid?

(Multiple Choice)
4.8/5
(83)

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

(Short Answer)
4.8/5
(66)

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

(True/False)
4.9/5
(72)

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
(73)
Showing 1 - 20 of 41
close modal

Filters

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