πŸ“Š C++
Q. What is the output of the following code snippet? int x = 10; int *ptr = &x; cout << ptr;
  • (A) 10
  • (B) Address of x
  • (C) 0
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) Address of x

Explanation: The pointer 'ptr' holds the address of x, so 'cout << ptr' prints the address of x.

Explanation by: Vinay
The pointer 'ptr' holds the address of x, so 'cout << ptr' prints the address of x.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
177
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vinay
Publisher
πŸ“ˆ
97%
Success Rate