what does " calloc" do?
Answers were Sorted based on User's Feedback
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 |
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 |
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
What is the correct declaration of main?
What does typedef struct mean?
what will be the output of" printf("%d%d",scanf("%d% d",&a&b));"
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
What is Full Form of C and Why We use C
Write a program for deleting duplicate elements in an array
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
Can you subtract pointers from each other? Why would you?
What is the -> in c?
#include<stdio.h> int main( ) { Int a=300, b, c; if(a>=400) b=300; c=200; printf(“%d%d ”, b, c); return0; }
int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?