Jun 122012
 

What will be the output of the below code ?

        int* myFunc()
        {
            int x = 2;
            return &x;
        }
        main()
        {
             int* p = myFunc();
             printf("%d", *p);
        }

No! that the answer if not 2 :). Continue reading »