Dynamic memory allocation in c using realloc. #c #cprogramming #shorts

preview_player
Показать описание
realloc deallocates the old object pointed to by ptr and returns a pointer to a new object that has the size specified by size. The contents of the new object is identical to that of the old object prior to deallocation, up to the lesser of the new and old sizes. Any bytes in the new object beyond the size of the old object have indeterminate values.

The point to note is that realloc() should only be used for dynamically allocated memory. If the memory is not dynamically allocated, then behavior is undefined.

Dynamic memory allocation in c
c programming practice
c programming tutorial
c program for interview
c important questions
what is dynamic memory allocation in c language
free function in c plus plus
dynamic memory allocation in c plus plus
c plus plus practice questions
c plus plus interview questions
c plus plus programming tutorial
c plus plus shorts video.
realloc function in c

#c #programming #practicequestion #cprogramming #cvideos
#interviewquestion #ctutorial #programs#youtube #viralshorts #viral #viralvideo #CodingWithAnkit #codingwithankit #codewithankit
Рекомендации по теме