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

How can I pad a string to a known length?

608


Are local variables initialized to zero by default in c?

545


What are logical errors and how does it differ from syntax errors?

651


Explain what is operator promotion?

629


What is the use of structure padding in c?

556






What is #error and use of it?

670


How can I implement a delay, or time a users response, with sub-second resolution?

615


What are multibyte characters?

639


What is void c?

560


What is dynamic dispatch in c++?

552


c language interview questions & answer

1455


How can I do peek and poke in c?

611


What is the best way of making my program efficient?

561


Is array a primitive data type in c?

573


What does malloc () calloc () realloc () free () do?

554