Objective1 markeasySolution
What is the return type of the malloc() function in C?
- Aint*
- Bchar*
- Cvoid*
- Dfloat
C Programming
Nepal's open education portal — School, +2, Diploma, Bachelor & Master in one place
solution · en · Verified by Editorial Board
Correct Answer: (c) void*
Explanation: malloc() allocates raw memory on the heap and returns a generic pointer of type void*, which can be explicitly typecast to any pointer type (e.g., (int*)malloc(...)).