C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 31)
31.
Which of the following is the correct way of declaring a function as constant?
const int ShowData(void) { /* statements */ }
int const ShowData(void) { /* statements */ }
int ShowData(void) const { /* statements */ }
Both A and B
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
13 comments Page 2 of 2.

Govind kawde said:   8 years ago
Yes, I too think option D is Correct.

Sai Aditya said:   4 years ago
I think option D is the right one.

Neel desai said:   1 decade ago
Can you give one example ?


Post your comments here:

Your comments will be displayed after verification.