What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int x;
int *p;
x = 5;
p = &x;
cout << *p;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int x;
int *p;
x = 5;
p = &x;
cout << *p;
return 0;
}
A. 5
B. 10
C. memory address
D. 15
Answer: Option A
Join The Discussion