--:--









Quiz for Pointers to objects and member functions

Course: C++ Language | Subject: Unit 8 | Topic: Pointers and Dynamic Memory Management



Logo

Q1: How do you declare a pointer to an object of class MyClass?

Logo

Q2: How do you access an object member using a pointer?

Logo

Q3: What is the syntax to declare a pointer to a member function?

Logo

Q4: How to invoke a member function via pointer to member function?

Logo

Q5: How do you call a member function pointer via pointer to object?

Logo

Q6: Can pointers to member functions be assigned to regular function pointers?

Logo

Q7: What is the size of a pointer to member function?

Logo

Q8: Are pointers to members valid without an object?

Logo

Q9: What keyword is used to declare a pointer to a const member function?

Logo

Q10: Can you have pointers to static member functions?

Logo

Q11: How do you assign a pointer to a member function?

Logo

Q12: Can pointers to member variables be used similarly to pointers to member functions?

Logo

Q13: How do you access a member variable via pointer to member?

Logo

Q14: Can pointer to member functions point to overloaded functions?

Logo

Q15: What is the difference between a pointer to member and a regular pointer?

Logo

Q16: What happens if you dereference a null pointer to an object?

Logo

Q17: How do you pass a pointer to an object to a function?

Logo

Q18: Which of the following is true about pointer to member functions?

Logo

Q19: Can you assign nullptr to a pointer to member function?

Are you ready to start test? Set your time limit