Home / C Programming / Pointers :: Discussion

Discussion :: Pointers

  1. What will be the output of the program ?

    #include 
     
     int main()
     {
         void *vp;    
         char ch=74, *cp="JACK";  
         int j=65;    
         vp=&ch;  
         printf("%c", *(char*)vp);     
         vp=&j;     
         printf("%c", *(int*)vp); 
         vp=cp;    
         printf("%s", (char*)vp+2);  
         return 0;
     }
    

  2. A.

    JCK

    B.

    J65K

    C.

    JAK

    D.

    JACK

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment