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 |
What is far pointer in c?
second highest number in a given set of numbers
I need previous papers of CSC.......plz help out by posting them.......
What is signed and unsigned?
what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year
What is c++ used for today?
What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }
How can you read a directory in a C program?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
what is the difference between strcpy() and memcpy() function?
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }