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

What is the scope of local variable in c?

578


Explain what is the difference between functions abs() and fabs()?

621


What are categories used for in c?

568


Why isn't it being handled properly?

645


can we have joblib in a proc ?

1656






Can you please compare array with pointer?

617


what type of questions arrive in interview over c programming?

1559


What is the difference between text and binary modes?

648


Do you have any idea how to compare array with pointer in c?

604


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

658


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

645


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

563


What are the usage of pointer in c?

703


Once I have used freopen, how can I get the original stdout (or stdin) back?

628


What are 3 types of structures?

594