πŸ“Š C++
Q. Which of the following correctly declares a pointer in C++?
  • (A) int ptr;
  • (B) int *ptr;
  • (C) pointer<int> ptr;
  • (D) int ptr[];
πŸ’¬ Discuss
βœ… Correct Answer: (B) int *ptr;

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
100
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rakesh Kumar
Publisher
πŸ“ˆ
87%
Success Rate