Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

Cpp Programming Quiz 119 – Which of the following statements is correct about the program given below?

Question: 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;
}

[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. 

Answer: Option D