Skip to content

Latest commit

 

History

History

0x0B-malloc_free

0x0B. C - malloc, free

Description

What you should learn from this project:

  • What is the difference between automatic and dynamic allocation
  • What is malloc and free and how to use them
  • Why and when use malloc
  • How to use valgrind to check for memory leak

  • Write a function that creates an array of chars, and initializes it with a specific char.
  • Write a function that returns a pointer to a newly allocated space in memory, which contains a copy of the string given as a parameter.
  • Write a function that concatenates two strings.
  • Write a function that returns a pointer to a 2 dimensional array of integers.
  • Write a function that frees a 2 dimensional grid previously created by your alloc_grid function.
  • Write a function that concatenates all the arguments of your program.
  • Write a function that splits a string into words.

Author