C program hangs / suspends while executing shellcode
===

    #include <stdio.h>
    char shellcode[] = "some shellcode here";
    int main (int argc, char **argv) {
        void (*sptr)();
        sptr = (void(*)()) (&shellcode);
        sptr();
        printf("must display this");
        return 0;
    }


While running the program, it executes the sptr() and hangs there. printf("..") is never executed. My problem is I want the program to execute printf().

Please help :)