Vidyalelo
C++ Programming · Q140

Functions and Procedures in C++

Programming · C++ Programming · question 140

Q140

What will be the new value of x in the following C++ code? #include using namespace std; void fun(int &x) x = 20; int main() int x = 10; fun(x); cout << "New value of x is " << x; return 0;

A.
10
B.
20
Answer
C.
15
D.
36

Answer: Option B

Solution

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