what does " calloc" do?

Answers were Sorted based on User's Feedback



what does " calloc" do?..

Answer / guest

A memory allocation and initialising to zero.

Is This Answer Correct ?    13 Yes 0 No

what does " calloc" do?..

Answer / 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

what does " calloc" do?..

Answer / shruti

the calloc function will allocate memory , and also
initialise the variables to a particular value..

Is This Answer Correct ?    1 Yes 0 No

what does " calloc" do?..

Answer / debu

This function allocates multiple blocks of memory of same
size, initializes all locations to zero and returns a
pointer to the first byte of allocated space.

Is This Answer Correct ?    0 Yes 0 No

what does " calloc" do?..

Answer / rani

a memory allocation for the multiple blocks i.e array of
blocks and intialising the first block to zero.

Is This Answer Correct ?    1 Yes 2 No

what does " calloc" do?..

Answer / srinivas

Allocate memory where ever it is free and that to it is in
terms of block and initialises that block to zero.

Is This Answer Correct ?    0 Yes 1 No

what does " calloc" do?..

Answer / anjana devi

calloc will reallocate the memeory created by malloc

Is This Answer Correct ?    2 Yes 12 No

Post New Answer

More C Interview Questions

Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort

7 Answers  


What is the correct declaration of main?

0 Answers  


What does typedef struct mean?

0 Answers  


what will be the output of" printf("%d%d",scanf("%d% d",&a&b));"

4 Answers  


write a program to display the numbers in the following 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4

1 Answers  






What is Full Form of C and Why We use C

23 Answers  


Write a program for deleting duplicate elements in an array

3 Answers   Subex,


What is the output of the following progarm? #include<stdio.h> main( ) { int x,y=10; x=4; y=fact(x); printf(ā€œ%d\nā€,y); } unsigned int fact(int x) { return(x*fact(x-1)); } A. 24 B. 10 C. 4 D. none

2 Answers  


Can you subtract pointers from each other? Why would you?

0 Answers  


What is the -> in c?

0 Answers  


#include<stdio.h> int main( ) { Int a=300, b, c; if(a>=400) b=300; c=200; printf(“%d%d ”, b, c); return0; }

1 Answers  


int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?

6 Answers   TCS,


Categories