what does " calloc" do?

Answer Posted / shubham bajpai

CALLOC FUNCTION DYNAMICALLY ALLOCATES MEMORY IN FORM OF BLOCKS(CONSECUTIVE) & INITIALIZES ALL BLOCKS TO 0.

CALLOC FUNCTION REQUIRES 2 ARGUMENTS IN ITS CALLING.

EXAMPLE:

PTR=(INT *)CALLOC(SIZEOF(INT),N);

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the control statements in C language

638


What is new line escape sequence?

793


Can you write the algorithm for Queue?

1539


Do string constants represent numerical values?

906


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

579






What is infinite loop?

618


What are different types of variables in c?

559


What is meant by recursion?

617


The statement, int(*x[]) () what does in indicate?

635


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

594


Why flag is used in c?

644


What are the advantages of union?

619


What does %d do in c?

535


What are Macros? What are its advantages and disadvantages?

631


Do you know the difference between malloc() and calloc() function?

600