IT Community - Software Programming, Web Development and Technical Support

c and c++

This is a discussion on c and c++ within the C and C++ Programming forums, part of the Software Development category; What are the Difference between malloc and calloc ? Malloc allocates memory blocks and returns a void pointer to the allocated ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C and C++ Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 12-14-2007, 03:21 AM
sureshbb sureshbb is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 149
sureshbb is on a distinguished road
Default c and c++

What are the Difference between malloc and calloc ?

Malloc allocates memory blocks and returns a void pointer to the allocated space, or NULL if there is insufficient memory available.
calloc allocates an array in memory with elements initialized to 0 and returns a pointer to the allocated space. calloc calls malloc in order to use the C++ _set_new_mode function to set the new handler mode.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 02:29 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0