WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?

Answer Posted / prakashdasari

malloc () for allocating the single block of memory
calloc () for allocating multiple blocks of memory
the values assigned are garbage in case of malloc() and
proper values (zeros) are assigned in case of calloc().

Is This Answer Correct ?    114 Yes 34 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between test design and test case design?

1562


what is the difference between class and unio?

1852


to find the closest pair

1812


What are the 5 types of organizational structures?

540


Is exit(status) truly equivalent to returning the same status from main?

576






Why C language is a procedural language?

610


Can stdout be forced to print somewhere other than the screen?

609


What are void pointers in c?

566


What is calloc() function?

614


Where are local variables stored in c?

562


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

659


What are the types of arrays in c?

614


Tell me about low level programming languages.

633


What are Macros? What are its advantages and disadvantages?

631


How can I find out how much free space is available on disk?

620