Characteristics | malloc( ) | calloc( ) |
Arguments | malloc() takes only single argument which is amount of memory to allocate in bytes. | calloc() needs two arguments i.e. No. of variables to allocate in memory, and the size of single variable in bytes. |
Memory Initialization | malloc() does not initialize the allocated memory .
| calloc() initializes the allocated memory to zero
|
Thursday, April 4, 2013
Difference Between malloc and alloc Functions
Labels:
Programming
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment