Skip to content
Related Articles
Open in App
Not now

Related Articles

C | Dynamic Memory Allocation | Question 5

Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

What is the return type of malloc() or calloc()
(A) void *
(B) Pointer of allocated memory type
(C) void **
(D) int *


Answer: (A)

Explanation: malloc() and calloc() return void *.

We may get warning in C if we don’t type cast the return type to appropriate pointer.

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!