Multiple Choice
What is the output of the following program?
#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
Q4: _ functions may have the same name,
Q5: This statement causes a function to end.<br>A)
Q7: If a function is called more than
Q15: A function can have zero to many
Q22: When used as parameters, these types of
Q27: Look at the following function prototype. <br><img
Q30: You may use the exit() function to
Q37: It is a good programming practice to
Q40: Here is the header for a function
Q48: This is a statement that causes a