What is the output of the following code? Suppose that necessary headers have been included.
Does this lead to undefined behavior? When compiled with g++ and run, it prints "test".
class A {
public:
    void test()
    {
        printf("test\n");
    }
};
int main()
{
    A *pa = NULL;
    pa->test();
}
 
    