The function malloc() returns:

2025

The function malloc() returns:

Answer: C. void *The C library function malloc returns a pointer of type void * that can be converted to the required object pointer type.

  1. A.

    int *

  2. B.

    char *

  3. C.

    void *

  4. D.

    Nothing

Attempted by 331 students.

Show answer & explanation

Correct answer: C

The C library function malloc returns a pointer of type void * that can be converted to the required object pointer type.

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…