Vidyalelo
C++ Programming · Q20

Pointers and References in C++

Programming · C++ Programming · question 20

Q20

What is the output of the following code: int x = 10; int *ptr = &x; cout << *ptr << " " << ptr; in C++?

A.
10 Memory address of x
B.
10 Value of x
C.
Compilation error
D.
10 Address of x
Answer

Answer: Option D

Solution

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