Programming Languages C++ Objective
Mar 19, 2013

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

Choose the correct answer:
A) const int ShowData(void) { /* statements */ }
B) int const ShowData(void) { /* statements */ }
C) int ShowData(void) const { /* statements */ }
D) All of the above
Detailed Explanation

Option C is the right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback