Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int a = 9;
6.
int & aref = a;
7.
a++;
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int a = 9;
6.
int & aref = a;
7.
a++;
8.
cout
Answer: Option B
Was this answer helpful ?
The value is declared and it is post incremented, so it's value is 10.
$ g++ ref1.cpp
$ a.out
10
Was this answer helpful ?
More Questions on This Topic :
Question 1.
What does a reference provide?
....
Question 10.
Which of the following statement is correct?
....
Submit Solution