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.
Correct Answer:
The program reports linker error.
← Previous Question
Next Question→
More Questions from
Objects and Classes
Which of the following also known as an instance of a class?
Which of the following can be overloaded?
What happens when we try to compile the class definition in following code snippet? class Birds {}; class Peacock : protected Birds {};
Which of the following two entities (reading from Left to Right) can be connected by the dot operator?
Which of the following is the only technical difference between structures and classes in C++?
Which of the following means "The use of an object of one class in definition of another class"?
Which of the following can access private data members or member functions of a class?
Which of the following keywords is used to control access to a class member?
Which of the following statements is correct?
Which of the following statements is incorrect?
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments