Home / C++ Programming / OOPS Concepts :: Discussion

Discussion :: OOPS Concepts

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

  2. A.
    const int ShowData(void) { /* statements */ }
    B.
    int const ShowData(void) { /* statements */ }
    C.
    int ShowData(void) const { /* statements */ }
    D.
    Both A and B

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment