1.

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

A. <i class="cpp-code">const int ShowData(void) { /* statements */ }</i>
B. <i class="cpp-code">int const ShowData(void) { /* statements */ }</i>
C. <i class="cpp-code">int ShowData(void) const { /* statements */ }</i>
D. Both A and B
Answer» D. Both A and B


Discussion

No Comment Found

Related MCQs