Home / C Programming / Structures, Unions, Enums :: Discussion

Discussion :: Structures, Unions, Enums

  1. What will be the output of the program in 16-bit platform (under DOS)?

    
      #include
     
       int main() 
       {   
         struct node    
         {        
            int data;    
            struct node *link;     
        };       
        struct node *p, *q;  
        p= (struct node *) malloc(sizeof(struct node));  
        q = (struct node *) malloc(sizeof(struct node));     printf("%d, %d\n", sizeof(p), sizeof(q));  
        return 0; 
    } 

     

  2. A.

    2, 2

    B.

    8, 8

    C.

    5, 5

    D.

    4, 4

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment