-
What is the output of this program?
#include <iostream>
using namespace std;
int main()
{
int num1, num2;
int* Res;
Res = &num1;
num1 = 150;
num2 = 100;
*Res = 150;
num2 = *Res;
cout << *Res << " " << num2;
return 0;
}
-
- 200 200
- 100 100
- 150 150
- Compilation Error
- None of these
Correct Option: C
In this program, We are making the assignments and invoking the both num1 and num2 values as 150 by dereference operator.