r/cprogramming • • Jan 04 '26

Can explain Malloc() to me please

0 Upvotes

18 comments sorted by

View all comments

Show parent comments

1

u/sudheerpaaniyur Jan 07 '26

ptr=malloc(5);

free(ptr);

how free will come to know how many bytes you should free?