1 All functions are characterized as either value-returning functions or ____ fu
ID: 3625510 • Letter: 1
Question
1All functions are characterized as either value-returning functions or ____ functions.
Choose one answer.
a. program-defined
b. void
c. built-in
d. static
..Question 2
The function prototype ____ indicates that the first two variables are passed by value, while the third and fourth variables are passed by reference.
Choose one answer.
a. void calc(double, double, double @, double @);
b. void calc(double %, double %, double, double);
c. void calc(double, double, double &, double &);
d. void calc(double *, double *, double, double);
..Question 3
____ is an example of a valid function call.
Choose one answer.
a. void calc(double current, double rate, double &increase, double &pay)
b. void calc(double, double, double &, double &);
c. calc(salary, raiseRate, &raise, &newSalary);
d. calc(salary, raiseRate, raise, newSalary);
..Question 4
A ____ is a block of code that performs a task.
Choose one answer.
a. expression
b. statement
c. program
d. function
..Question 5
Every C++ program contains at least one function: ____.
Choose one answer.
a. pow()
b. return()
c. rand()
d. main()
.
.Question 6
] You can use the built-in C++ ____ function to raise a number to a power and then return the result as a double number.
Choose one answer.
a. pow()
b. power()
c. xy()
d. raise()
.
.Question 7
] The ____ store the information passed to the function when the function is invoked.
Choose one answer.
a. formal parameters
b. actual parameters
c. formal arguments
d. actual arguments
..Question 8
]The ____ contains the instructions the function must follow to perform its assigned task.
Choose one answer.
a. formal parameters list
b. function header
c. actual arguments list
d. function body
..Question 9
]The function body begins with ____.
Choose one answer.
a. (
b. #
c. [
d. {
.
.Question 10
] The ____ alerts the computer that the function has completed its task.
Choose one answer.
a. return statement
b. quit statement
c. )
d. exit statement
..Question 11
]An actual argument can be a variable, named constant, literal constant, or keyword; however, in most cases it will be a ____.
Choose one answer.
a. literal constant
b. variable
c. keyword
d. named constant
.
.Question 12
] A ____ function returns precisely one value to the statement that called the function.
Choose one answer.
a. program-defined
b. value-returning
c. void
d. built-in
..Question 13
] When a function definition appears below the main() function, you must enter a function ____ above the main() function.
Choose one answer.
a. prototype
b. parameter
c. argument
d. declaration
..]
Question 14
] In a function header, the keyword ____ indicates that the function does not return a value.
Choose one answer.
a. int
b. null
c. void
d. false
..
Question 15
]Passing a variable’s value to a function is referred to as passing by ____.
Choose one answer.
a. value
b. address
c. copy
d. reference
..Question 16
] Passing a variable’s address to a function is referred to as passing by ____.
Choose one answer.
a. copy
b. address
c. reference
d. value
.
.Question 17
] Unless specified otherwise, variables are passed by ____ in C++.
Choose one answer.
a. reference
b. address
c. copy
d. value
..Question 18
]The variables listed in a function header are ____ to the function.
Choose one answer.
a. public
b. private
c. global
d. local
..Question 19
]You pass a variable by ____ when you want the receiving function to change the contents of the variable.
Choose one answer.
a. reference
b. copy
c. value
d. address
.
.Question 20
To pass a variable by reference in C++, you include a ____ before the name of the corresponding formal parameter in the receiving function’s header.
Choose one answer.
a. @
b. *
c. #
d. &
..
Explanation / Answer
please rate - thanks
1
All functions are characterized as either value-returning functions or ____ functions.
Choose one answer.
a. program-defined
b. void
c. built-in
d. static
..Question 2
The function prototype ____ indicates that the first two variables are passed by value, while the third and fourth variables are passed by reference.
Choose one answer.
a. void calc(double, double, double @, double @);
b. void calc(double %, double %, double, double);
c. void calc(double, double, double &, double &);
d. void calc(double *, double *, double, double);
..Question 3
____ is an example of a valid function call.
Choose one answer.
a. void calc(double current, double rate, double &increase, double &pay)
b. void calc(double, double, double &, double &);
c. calc(salary, raiseRate, &raise, &newSalary);
d. calc(salary, raiseRate, raise, newSalary);
..Question 4
A ____ is a block of code that performs a task.
Choose one answer.
a. expression
b. statement
c. program
d. function
..Question 5
Every C++ program contains at least one function: ____.
Choose one answer.
a. pow()
b. return()
c. rand()
d. main()
.
.Question 6
] You can use the built-in C++ ____ function to raise a number to a power and then return the result as a double number.
Choose one answer.
a. pow()
b. power()
c. xy()
d. raise()
.
.Question 7
] The ____ store the information passed to the function when the function is invoked.
Choose one answer.
a. formal parameters
b. actual parameters
c. formal arguments
d. actual arguments
..Question 8
]The ____ contains the instructions the function must follow to perform its assigned task.
Choose one answer.
a. formal parameters list
b. function header
c. actual arguments list
d. function body
..Question 9
]The function body begins with ____.
Choose one answer.
a. (
b. #
c. [
d. {
.
.Question 10
] The ____ alerts the computer that the function has completed its task.
Choose one answer.
a. return statement
b. quit statement
c. )
d. exit statement
..Question 11
]An actual argument can be a variable, named constant, literal constant, or keyword; however, in most cases it will be a ____.
Choose one answer.
a. literal constant
b. variable
c. keyword
d. named constant
.
.Question 12
] A ____ function returns precisely one value to the statement that called the function.
Choose one answer.
a. program-defined
b. value-returning
c. void
d. built-in
..Question 13
] When a function definition appears below the main() function, you must enter a function ____ above the main() function.
Choose one answer.
a. prototype
b. parameter
c. argument
d. declaration
..]
Question 14
] In a function header, the keyword ____ indicates that the function does not return a value.
Choose one answer.
a. int
b. null
c. void
d. false
..
Question 15
]Passing a variable’s value to a function is referred to as passing by ____.
Choose one answer.
a. value
b. address
c. copy
d. reference
..Question 16
] Passing a variable’s address to a function is referred to as passing by ____.
Choose one answer.
a. copy
b. address
c. reference --- in the old days also called by address
d. value
.
.Question 17
] Unless specified otherwise, variables are passed by ____ in C++.
Choose one answer.
a. reference
b. address
c. copy
d. value
..Question 18
]The variables listed in a function header are ____ to the function.
Choose one answer.
a. public
b. private
c. global
d. local
..Question 19
]You pass a variable by ____ when you want the receiving function to change the contents of the variable.
Choose one answer.
a. reference
b. copy
c. value
d. address
.
.Question 20
To pass a variable by reference in C++, you include a ____ before the name of the corresponding formal parameter in the receiving function’s header.
Choose one answer.
a. @
b. *
c. #
d. &
..
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.