Given the following function definition
void calc (int a, int& b)
{
int c;
c = a + 2;
a = a * 3;
b = c + a;
}
What is the output of the following code fragment that invokes calc?
(All variables are of type int)
x = 1;
y = 2;
z = 3;
Calc(x, y) ;
Cout << x << " " << y << " " << z << endl;
A) 1 2 3
B) 1 6 3
C) 3 6 3
D) 1 14 9
E) None of these
Correct Answer:
Verified
Q1: This function causes a program to terminate,
Q2: _ functions may have the same name,
Q3: This is a statement that causes a
Q6: In a function header, you must furnish:
A)data
Q6: This type of variable is defined inside
Q7: It is a good programming practice to
Q18: A function is executed when it is
A)
Q26: A function _ eliminates the need to
Q28: A _ variable is declared outside all
Q34: When used as parameters, these types of
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents