Difference between realloc() and free?

Answer Posted / keerthana

realloc() is used to reallocate the memory when the memory
which is already allocate is not sufficient
free() is used to free the memory space

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats is abstraction in oops?

591


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1415


What is the problem with multiple inheritance?

584


program for insertion ,deletion,sorting in double link list

2278


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1941






What is an example of genetic polymorphism?

647


What is a class and object?

598


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1403


What is class and object in oops?

609


Why do we use class in oops?

555


What does it mean when someone says I oop?

583


Why is there no multiple inheritance?

565


Explain the concepts involved in Object Oriented programming.

633


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2164


What are the benefits of polymorphism?

621