1. Question: Which header file should be included to use functions like malloc() and calloc()? 

    A
    memory.h

    B
    stdlib.h

    C
    string.h

    D
    dos.h


    1. Twitter
    2. Details
  2. Question: What function should be used to free the memory allocated by calloc() ? 

    A
    dealloc();

    B
    malloc(variable_name, 0)

    C
    free();

    D
    memalloc(variable_name, 0)


    1. Twitter
    2. Details
  3. Question: How will you free the memory allocated by the following program?
    #include<stdio.h>
    #include<stdlib.h>
    #define MAXROW 3
    #define MAXCOL 4
    
    int main()
    {
        int **p, i, j;
        p = (int **) malloc(MAXROW * sizeof(int*));
        return 0;
    }
    
     

    A
    memfree(int p);

    B
    dealloc(p);

    C
    malloc(p, 0);

    D
    free(p);


    1. Twitter
    2. Details
  4. Question: Specify the 2 library functions to dynamically allocate memory? 

    A
    malloc() and memalloc()

    B
    alloc() and memalloc()

    C
    malloc() and calloc()

    D
    memalloc() and faralloc()


    1. Twitter
    2. Details