• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 724
  • Last Modified:

what is the difference between malloc and calloc??

what is the difference between malloc and calloc??
0
shilpi84
Asked:
shilpi84
1 Solution
 
alain34Commented:
You can find an explanation of malloc and calloc here:
http://en.wikipedia.org/wiki/Malloc
0
 
Renato Montenegro RusticiIT SpecialistCommented:
malloc: reserves memory using a void pointer. It uses a void pointer cause doesnt matter what kind of data will be on the destination memory space.

calloc: works in the same way, but tries to initialize the memory with zeros, if its possible.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now