Thread: Difference BW malloc() and calloc() and realloc()

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    3

    Difference BW malloc() and calloc() and realloc()

    Difference BW malloc() and calloc() and realloc()

  2. #2
    Registered User
    Join Date
    Nov 2008
    Location
    INDIA
    Posts
    64
    - malloc function allocates a specified number of bytes of memory. The initial value of the memory is indeterminate.

    - calloc funtion allocates space for a specified number of objects of a specified size. The space is initialized to all 0 bits.


    - realloc function increases or decreases the size of a previously allocated area. When the size increases, it may involve moving the previously allocated area somewhere else, to provide the additional room at the end. Also, when the size increases, the initial value of the space between the old contents and the end of the new area is indeterminate.

  3. #3
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    Quote Originally Posted by svelmca View Post
    Difference BW malloc() and calloc() and realloc()
    google it you'll find much material.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Malloc, Realloc and Calloc Help/Suggestion
    By zensatori in forum C Programming
    Replies: 7
    Last Post: 04-14-2007, 02:46 PM
  2. malloc and realloc
    By jayfriend in forum C Programming
    Replies: 4
    Last Post: 01-05-2007, 02:25 PM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. Linked list versus malloc and realloc.
    By Bajanine in forum C Programming
    Replies: 2
    Last Post: 06-20-2005, 08:08 PM
  5. confused about arrays
    By sal817 in forum C Programming
    Replies: 17
    Last Post: 09-20-2004, 03:45 PM