Answer Posted / namita
1-memory allocated by malloc contains garbage value.But
memory allocated by calloc is initialised to zero.
2-malloc takes only one argument which indicates the size
to be allocated.But calloc takes two arguments.First
argument indicates the number of blocks to be allocated
where as the second argument indicates the size of the
block.
| Is This Answer Correct ? | 35 Yes | 2 No |
Post New Answer View All Answers
what is the diffrenet bettwen HTTP and internet protocol
What is line in c preprocessor?
What is difference between class and structure?
What is the difference between memcpy and memmove?
What is file in c preprocessor?
If you know then define #pragma?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
Multiply an Integer Number by 2 Without Using Multiplication Operator
How can you increase the allowable number of simultaneously open files?
How to Throw some light on the splay trees?
What is operator precedence?
If the size of int data type is two bytes, what is the range of signed int data type?
When should volatile modifier be used?
Why do we use int main instead of void main in c?
What is the use of linkage in c language?