Home / C++ Programming / Objects and Classes :: Discussion

Discussion :: Objects and Classes

  1. Which of the following statements is correct about the program given below?

    class Bix {     public:     static void MyFunction(); }; int main() {     void(*ptr)() = &Bix::MyFunction;     return 0;  }

  2. A.
    The program reports an error as pointer to member function cannot be defined outside the definition of class.
    B.
    The program reports an error as pointer to static member function cannot be defined.
    C.
    The program reports an error as pointer to member function cannot be defined without object.
    D.
    The program reports linker error.

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment