class AA
{
public:
void print(){std::cout<<"in class A"<<std::endl;}
};
int _tmain(int argc, _TCHAR* argv[])
{
AA *a= NULL;
a->print();
return 0;
}
Above code outputs "in class A" . Since a is pointing to NULL, how print function can be called when object is pointing to NULL.