Q. Which of the following is the correct way of declaring a function as constant?

  • (A) const int ShowData(void) { /* statements */ }
  • (B) int const ShowData(void) { /* statements */ }
  • (C) int ShowData(void) const { /* statements */ }
  • (D) Both A and B
πŸ’¬ Discuss
βœ… Correct Answer: (C) int ShowData(void) const { /* statements */ }

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
184
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
86%
Success Rate