Exam 6: User-Defined Functions

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

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

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

D

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

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

True

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

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

C

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

(Multiple Choice)
4.8/5
(29)

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

(True/False)
4.7/5
(45)

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

(Multiple Choice)
4.8/5
(43)

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

(Multiple Choice)
4.8/5
(38)

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

(Short Answer)
4.8/5
(44)

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

(Short Answer)
4.8/5
(49)

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

(Multiple Choice)
4.9/5
(39)

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

(Short Answer)
4.8/5
(33)

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

(Short Answer)
4.8/5
(38)

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

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

(Multiple Choice)
4.9/5
(31)

The ____________________ of an identifier refers to where in the program an identifier is accessible (visible).

(Short Answer)
4.8/5
(32)

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

(Short Answer)
4.8/5
(43)

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

(Short Answer)
4.9/5
(39)

The output of the statement: cout << tolower('$')<< endl; Is ____.

(Multiple Choice)
4.8/5
(36)

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

(Multiple Choice)
4.9/5
(33)

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.9/5
(44)
Showing 1 - 20 of 50
close modal

Filters

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