Results 1 to 2 of 2

Thread: difference between malloc calloc realloc

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Location
    india
    Posts
    2

    difference between malloc calloc realloc

    can anybody please tell me the exact difference between calloc malloc and realloc

    thanx a lot
    plzzzz

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Code:
    calloc
    Allocates an array in memory with elements initialized to 0.
    void *calloc( size_t num, size_t size );
    
    malloc
    Allocates memory blocks.
    void *malloc( size_t size );
    
    realloc
    Reallocate memory blocks.
    void *realloc( void *memblock, size_t size );
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width