Vidyalelo
C++ Programming · Q98

Pointers and References in C++

Programming · C++ Programming · question 98

Q98

What will be the output of the following C++ code? #include using namespace std; int main() int a = 9; int & aref = a; a++; cout << "The value of a is " << aref; return 0;

A.
9
B.
10
Answer
C.
error
D.
11

Answer: Option B

Solution

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