Question: Questions 1 - 3: Matching. Select the correct definition at right for each of the terms at left: 1. Parameter 2. Return value 3. Local
Questions 1 - 3: Matching. Select the correct definition at right for each of the terms at left:
1. Parameter
2. Return value
3. Local variable
A. A variable thats declared inside of a function body
B. The result of a function call
C. Stores the value which is passed into a function
D. A variable thats declared outside all functions
E. Its name must be the same as the arguments name.
4. Which of the following is the meaning of the term void in the following line of C++ code?
void show_greeting(char greeting_type);
A. The function show_greeting is commented out.
B. The function show_greeting does not return a value
C. The parameter greeting_type is optional
D. The line has an error or is incorrect
E. The function is not used.
What would be output by the following program? (Hint: Pay close attention to the order of parameters/arguments.)
#include
using namespace std; int funq6(int b, int a); int main()
{
int a = 3, b = 4;
a = funq6(a, b);
cout << a; return 0; } int funq6(int b, int a)
{ return b - a;
}
A. -1
B. 1
C. 0 D. 3 E. None of these
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
