Vidyalelo
C++ Programming · Q128

Functions and Procedures in C++

Programming · C++ Programming · question 128

Q128

What will be the output of the following C++ code? #include using namespace std; void copy (int& a, int& b, int& c) a *= 2; b *= 2; c *= 2; int main () int x = 1, y = 3, z = 7; copy (x, y, z); cout << "x =" << x << ", y =" << y << ", z =" << z; return 0;

A.
2 5 10
B.
2 4 5
C.
2 6 14
Answer
D.
2 4 9

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board