Vidyalelo
C++ Programming · Q62

Pointers and References in C++

Programming · C++ Programming · question 62

Q62

What will be the output of the following C++ code? #include #include #include using namespace std; int main(int argc, char const *argv[]) int a = 5; int *p = &a; int *(&q) = p; cout<<q; return 0;

A.
5
B.
Address of pointer a
Answer
C.
Address of pointer p
D.
Error

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board