R

Rakesh Kumar • 28.44K Points
Instructor II

Q. Which of the following correctly declares a pointer in C++?

  • (A) int ptr;
  • (B) int *ptr;
  • (C) pointer<int> ptr;
  • (D) int ptr[];
  • Correct Answer - Option(B)
  • Views: 28
  • Filed under category C++

Explanation by: Rakesh Kumar
In C++, a pointer is declared using the '*' symbol, as in 'int *ptr;'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics