WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?

Answer Posted / shruti

malloc will only allocate space in the memory..

calloc will allocate space in the memory as well as
initialise it to a particular value.

Is This Answer Correct ?    134 Yes 39 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I manipulate strings of multibyte characters?

646


Why is void main used?

628


we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above

648


What does it mean when a pointer is used in an if statement?

612


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

692






1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2345


What is the meaning of 2d in c?

621


What is a program flowchart and explain how does it help in writing a program?

692


Where we use clrscr in c?

718


Explain what are linked list?

631


How can I split up a string into whitespace-separated fields?

577


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

672


What does dm mean sexually?

827


What are the disadvantages of c language?

630


Where static variables are stored in c?

599