Realloc in C Language

No comments



Re – alloc ( ):  When the previously allocated memory is not sapient and we need additional space for more elements. It is also possible that the memory allocated is much larger then necessary and we want to reduce it. In both the cases we can change the memory size already allocated with the help of function re – alloc.
                             This process is called re – allocation of memory.

Example :
ptr = malloc (size);
ptr = realloc (ptr,new size);

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀