Skip to content

Latest commit

 

History

History

0x0C-more_malloc_free

More Memory Management

Calloc, Realloc, and Exit are key functions in C programming. Calloc is used for dynamic memory allocation with automatic initialization, Realloc allows you to resize dynamically allocated memory, and Exit is used to terminate a program gracefully.

Learning Objectives

  • How to use the exit function
  • What are the functions calloc and realloc from the standard library and how to use them
File Description
0-malloc_checked.c Allocates memory using malloc.
1-string_nconcat.c Concatenates two strings.
2-calloc.c Allocates memory for an array, using malloc.
3-array_range.c Creates an array of integers.
100-realloc.c Reallocates a memory block using malloc and free.
101-mul.c Multiplies two positive numbers.
main.h The header file.