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

implement OR gate without using any bitwise operator.

1 Answers   Alcatel, Wipro,


5. What kind of sorting is this: SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort

2 Answers   Accenture,


What oops means?

0 Answers  


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

0 Answers   Wilco,


what is the output of the following program? main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

7 Answers  






What is a void pointer in c?

0 Answers  


shorting algorithmS

0 Answers   Wipro,


An entire structure variable can be assigned to another structure variable if __________

3 Answers   Sasken, TCS, Tech Mahindra, Wipro,


#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?

4 Answers   Ramco,


How many types of linked lists what are they? How many types of data structures?

18 Answers   BSNL, Pivotal Software,


Differentiate between ordinary variable and pointer in c.

0 Answers  


struct node { int *a; char *b; char array[12]; }; struct node m,*n; assign the value in *a,*b,char array[12]

3 Answers  


Categories