#include #include // _msize using namespace std; //a squence to test malloc and realloc 39 character //msize_realloc_malloc1.cpp int main () { char *ch1; char cYesNo; size_t size; // create a buffer to start with, then adjust size ch1 = (char *)malloc(100); size = _msize( ch1 ); cout<<"\t Instrunction you have "<>cYesNo; if(cYesNo=='y'){ ch1 =(char *)realloc(ch1,strlen(ch1)+1); if(ch1==NULL){cout<<"\n Allocation Error"; free(ch1); exit(1);} cout<<"\n reallocated :\n\t"<