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 linear search?
What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int);
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.
what will be the output for the following main() { printf("hi" "hello"); }
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.
How do you define structure?
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?
What are different types of operators?
what is data structure?
int n=1; while(1) { switch(n) { case 1:printf("a"); n++; continue; case 2:printf("b"); n++; continue; default : printf("c"); break; } break; }
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.