What is the difference between malloc() and realloc()?

Answer Posted / nashiinformaticssolutions

• malloc(): Allocates memory.
• realloc(): Resizes an already allocated memory block, preserving existing data if possible.

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 token?

824


Is sizeof a keyword in c?

757


How many types of sorting are there in c?

814


Can you please explain the difference between malloc() and calloc() function?

863


Why we write conio h in c?

756


what is the difference between class and unio?

2096


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

823


how to construct a simulator keeping the logical boolean gates in c

1989


Is multithreading possible in c?

761


What is the difference between class and object in c?

813


How do you view the path?

880


How can I discover how many arguments a function was actually called with?

829


How can I pad a string to a known length?

784


Is c compiled or interpreted?

883


Should a function contain a return statement if it does not return a value?

815