what does " calloc" do?

Answers were Sorted based on User's Feedback

Answer / guest

A memory allocation and initialising to zero.

Is This Answer Correct ?    13 Yes 0 No

Answer / shubham bajpai





Is This Answer Correct ?    4 Yes 1 No

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

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

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

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

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

what is difference between array of characters and string

18 Answers   Nest, Accenture,

Write a c program for sum of first n terms of the series S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......

2 Answers  

what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

0 Answers   L&T,

write a program to display the numbers having digit 9 in the given range from 1 to 100

1 Answers  

hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

0 Answers   TCS,

write a program of bubble sort using pointer?

3 Answers   TCS,

The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

0 Answers  

let's take a code struct FAQ { int a; char b; float c; double d; int a[10]; }*temp; now explain me how the memory will be allocated for the structure FAQ and what address will be in the structure pointer (temp)....................

8 Answers  

How to use c/c++ code in JAVA

10 Answers   IBM, CDAC, Satyam, Scope International,

say the following declaration is correct nr not. int b=a,n=0;

4 Answers   Wipro,

write a c program to check weather a particluar bit is set or not?

5 Answers   IBM,

what is the maximum no. of bytes calloc can allocate

4 Answers   Mphasis,