Dynamic memory allocation in the C language

C and C++ The C language Dynamic memory allocation

This online course of tutorials for the C programming language follows the first C course and reveals further constructs for dynamic memory allocation.

Introduction to pointers in the C language

Lesson 1 - Introduction to pointers in the C language

The tutorial introduces pointers in the C programming language. We'll learn to use the operators * and &.
FreeUnratedWritten by David Capka
Dynamic memory allocation in the C language

Lesson 2 - Dynamic memory allocation in the C language

The tutorial explains the difference between static and dynamic memory allocation. Using malloc() and free() we'll allocate memory for 100 ints at runtime.
FreeUnratedWritten by David Capka
Pointer arithmetic in the C language

Lesson 3 - Pointer arithmetic in the C language

In this tutorial, we'll learn to add integers to pointers and subtract pointers. We'll iterate through dynamic arrays using pointers and indexes.
FreeUnratedWritten by David Capka
Dynamic strings and structures in the C language

Lesson 4 - Dynamic strings and structures in the C language

In this tutorial, we'll learn to allocate strings dynamically exactly that long as we need them. Then we'll focus on passing structures by reference.
FreeUnratedWritten by David Capka
Dynamic arrays (vectors) in the C language

Lesson 5 - Dynamic arrays (vectors) in the C language

In this tutorial, we'll program vector, a dynamic array whose capacity is doubled when it's full. It occupies reasonable space and is not limited in size.
PremiumUnratedWritten by David Capka


 

Activities (1)