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

Answer Posted / arshad

1.
calloc function takes two argument while malloc takes only 1
2.
by default memory allocated by malloc contains garbage values
whereas that allocated by calloc contains all zero.

Is This Answer Correct ?    49 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a directory? How do I remove a directory (and its contents)?

613


Is null a keyword in c?

745


Write a program to generate the Fibinocci Series

673


What are runtime error?

645


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

1991






Write the Program to reverse a string using pointers.

629


write a programming in c to find the sum of all elements in an array through function.

1716


Write a program to find the biggest number of three numbers in c?

596


What is a double c?

601


What is the use of function overloading in C?

690


What is the use of getchar functions?

689


What is pointers in c?

672


What is difference between structure and union?

610


What does c in a circle mean?

591


What is call by value in c?

575