I am just curious that how is this program able to print the statement of func() of class.

```
#include <iostream>
using namespace std;
class foo
{
    public:
        void func ()
        {
            cout << "In func" << endl;
        }
    private:
        int a;
};

int main () {
    foo *f1 = NULL;
    f1->func();
}

```

Compiler version:
g++ (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.4.7
Copyright (C) 2010 Free Software Foundation, Inc.

How is that I am able to get the print of method func()?