Login
Remember
Register
CodersEditor Q&A
Online IDE
Questions
Unanswered
Tags
Users
Ask a Question
Programming Tutorials
Ask a Question
Difference between malloc() and calloc() memory allocation.
+1
vote
asked
Jan 18, 2021
by
PreethiSadhish
(
524
points)
Difference between malloc() and calloc() memory allocation.
c
malloc-and-calloc
memory
allocation
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 19, 2021
by
Gogul R
(
876
points)
selected
Jan 19, 2021
by
PreethiSadhish
Best answer
Malloc() takes single arguments but calloc() takes two arguments. Both malloc() and calloc() are used for dynamic allocation of memories. Malloc() alocates memory based on specified commands while calloc() allocates multiple blocks of memory.
Please
log in
or
register
to add a comment.
Welcome to CodersEditor Q&A, where you can ask questions and receive answers from other members of the community.
239
questions
203
answers
2
comments
692
users
Related questions
What is the main difference between the keyword struct and class?
What are the difference between C++ and Java?
How is memory managed in Python?
Which is the programming language that perform memory management effectively?
What are the differences between a shallow copy and a deep copy?
...