Skip to content

Latest commit

 

History

History

dynamic_memory_alloc

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Dynamic Memory Allocation

  • Concept area to understand dynamic memory allocation using malloc and free from 0x0B. C - malloc, free while trying to understand the concepts being taught.
  • Read this post on malloc and free to understand more with examples.
    • Below are C example programs from the above post.

Programs

  • Cool Example 1.
    • Compile this way: gcc cool.c -o cool
  • Number Exercise 1.
    • Compile this way: gcc number.c -o number
  • Create String Exercise 2.
    • Compile this way: gcc string.c -o string
  • Free cool.
    • Compile this way: gcc free_cool.c -o freecool
  • Free number.
    • Compile this way: gcc free_number.c -o freenumber