Home / C Programming / Memory Allocation :: Discussion

Discussion :: Memory Allocation

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

    #include 
    #include
      int main()
      {    
          int *p;   
          p = (int *)malloc(20);    
          printf("%d\n", sizeof(p));   
          free(p);     
          return 0;
     } 
    

  2. A.

    4

    B.

    2

    C.

    8

    D.

    Garbage value

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment