ExamLookup
Menu mobile
Home
Current Affairs
General Knowledge
Computer
Python
HTML
C Language
: Pointers
Difference between calloc() and malloc() is: , Difference between calloc() and malloc() is:
Difference between calloc() and malloc() is:
A.
calloc() takes a single argument while malloc() needs two arguments
calloc() takes a single argument while malloc() needs two arguments
B.
malloc() takes a single argument while calloc() needs two arguments
malloc() takes a single argument while calloc() needs two arguments
C.
malloc() initializes the allocated memory to ZERO
malloc() initializes the allocated memory to ZERO
D.
calloc() initializes the allocated memory to NULL
calloc() initializes the allocated memory to NULL
Solution
B. malloc() takes a single argument while calloc() needs two arguments
Explanation
The malloc() takes a single argument, while calloc() takess two. Second, malloc() does not initialize the memory allocated, while calloc() initializes the allocated memory to ZERO.Both malloc and calloc are used in C language for dynamic memory allocation they obtain blocks of memory dynamically.
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Exam Quiz
Website development Company in Allahabad