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

Answer Posted / venkateswarlupanidapu

malloc occupies byte of space in memory location and holds
only one argument of data bytes.
calloc occupies and holds 2 bytes of memory in address
location with arguments databytes,number of data bytes.
calloc occupies in structure of blocks and malloc allocates
in struncture of databytes.

Is This Answer Correct ?    14 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I get random integers in a certain range?

613


Array is an lvalue or not?

640


What are the differences between Structures and Arrays?

610


What are pointers really good for, anyway?

617


Explain the difference between the local variable and global variable in c?

603






What is the right way to use errno?

621


What are file streams?

572


What is a scope resolution operator in c?

751


What is spark map function?

581


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

656


What is preprocessor with example?

588


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

602


Explain what standard functions are available to manipulate strings?

613


Are the outer parentheses in return statements really optional?

577


How can I implement sets or arrays of bits?

607