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

if p is a string contained in a string?

0 Answers  


what would be the output of the following prog? Justify your answer? main() { unsigned char ch; unsigned char i; ch = -255; printf("%d",ch); i = -1; printf("%d",i); }

1 Answers  


Write a progarm to find the length of string using switch case?

0 Answers   TCS,


totally how much header files r in c language

8 Answers   TCS,


Can a binary search tree be used as an index? If yes, how? Explain

0 Answers   TCS,






Write a program in c using only loops to print * * * * * *******

2 Answers   IBM,


program to print upper & lower triangle of a matrix

2 Answers   TCS,


Can we include one C program into another C program if yes how?

7 Answers   Infosys,


Write a c program to demonstrate Type casting in c?

2 Answers  


#include<stdio.h> void main() { int =1; printf("%d%d%d",a++,++a,++a); }

3 Answers   VB,


difference between string and array?

6 Answers  


what will be the output: main(){char ch;int a=10;printf("%d",ch);}

36 Answers   TCS, Accenture, Wipro,






Categories