Answer Posted / vara
There are two differences.
1) is the number of arguments. Malloc() takes a single
argument (memory required in bytes), while calloc() needs
two arguments (number of variables to allocate memory, size
in bytes of a single variable).
2)malloc() does not initialize the memory allocated, while
calloc() initializes the allocated memory to ZERO.
Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
Why c is called a mid level programming language?
What is a const pointer in c?
Write a simple code fragment that will check if a number is positive or negative.
Explain the advantages of using macro in c language?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What are the main characteristics of c language describe the structure of ac program?
Write a code to generate divisors of an integer?
Explain what is the difference between a free-standing and a hosted environment?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
What is void main ()?
What is the use of putchar function?
What are predefined functions in c?
What is c language & why it is used?
Suggesting that there can be 62 seconds in a minute?
What is the difference between declaring a variable by constant keyword and #define ing that variable?