Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C++ Programming
»
Objects and Classes
Which of the following statements is correct about the program given below? class CuriousTab { public: static void MyFunction(); }; int main() { void(*ptr)() = &CuriousTab::MyFunction; return 0; }
The program reports an error as pointer to member function cannot be defined outside the definition of class.
The program reports an error as pointer to static member function cannot be defined.
The program reports an error as pointer to member function cannot be defined without object.
The program reports linker error.
Show Answer
Correct Answer:
The program reports linker error.
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment