dynamic memory allocation - malloc in c
The name malloc stands for memory allocation.
The malloc function reserves a block of memory of the specified number of bytes. And, it returns a pointer of void type , which can be casted into pointers of any form.
Example -
I have allocated memory dynamically with the help of malloc for 100 blocks of memory.
Each block is having size of 4 bytes. Hence , total of 400 bytes of memory would be allocated.
And lastly, pointer typecast is required of integer type.
#malloc #shorts #bydubebox #cprogramming
malloc in c | dynamic memory allocation | by dubebox #shorts
Теги
malloc in cdynamic memory allocationdynamic memory allocation in cc dynamic memory allocationmalloc function in cdynamic memory allocation mallocpointer in cdynamic memory allocation in cppdynamic memory allocation in c interview questionspointer in c playlistpointers in cpointers in c programmingpointerpointerspointers in cpppointers and references in c++c tutorialc tutorial for beginnersc tutorial for beginners in english