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

Answer Posted / vijay r15

malloc creates the
single block of gn
size by user. Malloc
takes 1ly 1 arg.

Calloc creates
multiple block of gn
size. It will
initialize the
reserved memory block
to zero. Calloc takes
2 arguments

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

1492


What is the symbol indicated the c-preprocessor?

696


Between macros and functions,which is better to use and why?

1570


In a switch statement, explain what will happen if a break statement is omitted?

639


What is this pointer in c plus plus?

598






What is c system32 taskhostw exe?

592


Why do we need volatile in c?

745


Explain what is the difference between null and nul?

659


What is volatile variable how do you declare it?

566


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

599


What is the use of getchar() function?

630


What is I ++ in c programming?

627


How do we declare variables in c?

571


What are keywords c?

603


What do you understand by normalization of pointers?

627