Multiple Choice
What will the following code display?
#include <iostream>
using namespace std;
void doSomething(int) ;
int main()
{
int x = 2;
cout << x << endl;
doSomething(x) ;
cout << x << endl;
return 0;
}
void doSomething(int num)
{
num = 0;
cout << num << endl;
}
A) 2
0
2
B) 2
2
2
C) 0
0
0
D) 2
0
0
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q1: What is the data type of the
Q2: A _ argument is passed to a
Q3: What will the following code display?<br>#include
Q4: What will the following code display?<br>#include
Q5: This statement causes a function to end.<br>A)
Q7: If a function is called more than
Q8: You must always furnish an argument with
Q9: It is not considered good programming practice
Q10: In the following function prototype, how many
Q11: A(n) _ is information that is passed