Q. What is the output of the following C++ code?
Code:
#include <iostream>
using namespace std;
int main()
{
int x = 2, v;
void *p = &x;
double y = 3;
p = &y;
v = x + y;
cout << v << ', ' << p;
return 0;
}
β
Correct Answer: (B)
Display 5, then the memory address