The number of arguments taken as input which allocating memory dynamically using malloc() is ___________

The number of arguments taken as input which allocating memory dynamically using malloc() is ___________
A. 0
B. 1
C. 2
D. 3
 
Answer: b
Explanation: An example of memory allocated using malloc():
(int*)malloc(3*sizeof(int)
It is clear from the above example that malloc() takes only one argument as input, that is the number of bytes to be allocated.
 

Tìm kiếm

Back
Top