πŸ“Š C++
Q. Which of the following is the correct way to define a constant pointer in C++?
  • (A) int* const ptr;
  • (B) const int* ptr;
  • (C) int const* ptr;
  • (D) const ptr* int;
πŸ’¬ Discuss
βœ… Correct Answer: (A) int* const ptr;

Explanation: In C++, 'int* const ptr;' defines a constant pointer to an integer.

Explanation by: Priyanka Tomar
In C++, 'int* const ptr;' defines a constant pointer to an integer.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
95
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Priyanka Tomar
Publisher
πŸ“ˆ
88%
Success Rate