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

What is linear search?

0 Answers  


What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int);

3 Answers   Bosch,


write a program that will accept two integers and will implement division without using the division operator if the second value is an odd number and will implement multiplication without using multiplication operator if the second value is an even number.

1 Answers  


what will be the output for the following main() { printf("hi" "hello"); }

5 Answers   RoboSoft,


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

0 Answers  






How do you define structure?

0 Answers  


struct abc { unsigned int a; char b; float r; }; struct xyz { int u; struct abc tt; }ww; ww = (struct xyz*)malloc(sizeof(struct xyz)); will the memory be allocated for the inner structure also?

1 Answers   Wipro,


What are different types of operators?

0 Answers  


what is data structure?

5 Answers   CBSE,


int n=1; while(1) { switch(n) { case 1:printf("a"); n++; continue; case 2:printf("b"); n++; continue; default : printf("c"); break; } break; }

1 Answers  


Write a program to compare two strings without using the strcmp() function

42 Answers   Accenture, Arba Minch University,


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

0 Answers   IBM,


Categories