-
What is the output of this program?
#include
using namespace std;
int main()
{
int num = 11;
int & numref = num;
num++;
cout << "The value of num is " << numref;
return 0;
}
-
- 12
- 11
- Garbage value
- Compilation Error
- Runtime Error
Correct Option: A
The value is declared and it isincrementedrement, so it’s value is 11.