28. Dynamic memory: malloc, calloc, realloc and free

Aap kis language mein padhna chahoge?

Which language do you want to learn in?

Code aur technical words English mein hi rahenge. Aap baad mein bhi language badal sakte ho.

Lesson 28

Dynamic memory: malloc, calloc, realloc and free

Unlock this lesson

Create a free account, then buy the course to open every lesson.

What you will learn in this lesson

  • Why a fixed array is not enough when you do not know the count.
  • The two places where variables live: the stack and the heap.
  • Ask for memory while the program runs with malloc.
  • Get memory filled with zeros with calloc.
  • Make your memory bigger with realloc, the safe way.

60 minutes Lesson 28 of 37

Everything in C Programming: BCA, MCA, BTech & O Level

  • 37 step-by-step lessons
  • 10 mini projects with solutions
  • A final project for your portfolio
  • Real commands and real output in every lesson
  • Practice task with a solution in each lesson
  • Progress saved to your account