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

Answer Posted / nazia wasim

malloc and calloc both are used to allocate
memory dynamically but the difference is
malloc allocates single block of memory and
calloc allocates multiple block of memory as
per the requirement.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c method?

527


What is a spanning Tree?

940


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

615


Define VARIABLE?

683


What do you mean by Recursion Function?

624






Why doesnt long int work?

602


Why does everyone say not to use scanf? What should I use instead?

676


How can you read a directory in a C program?

643


How do I round numbers?

589


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1878


What is the difference between single charater constant and string constant?

615


What is the function of multilevel pointer in c?

665


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1485


What does c in a circle mean?

571


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

651