C
23 articles in this topic

Memory Management in C: Stack, Heap, malloc, calloc, realloc and free with a Worked Example
Learn how C object lifetimes, allocation functions, ownership, bounds, and cleanup fit together through a complete resizable-array example.

Dynamic Memory Allocation in C: malloc, calloc, realloc and free with a Worked Example
A runnable marks example shows how C requests, initializes, grows and releases runtime storage, with checked byte counts, ownership and safe realloc handling.

Operator Overloading in C++: Syntax, Rules, and Worked Examples
Learn what C++ calls for an overloaded operator, then test addition, stream output, increment, and fraction comparison with exact values.

Inheritance in C++ Tutorial: Types, Access Modes and Runnable Examples
Learn what a derived class receives from its base, how access modes transform members, and how construction and virtual dispatch work through runnable examples.

Constructors and Destructors in C++: Object Lifetime with Runnable Examples
Trace constructor selection, copying, scope exit, reverse destruction, and RAII through two complete C++17 programs with exact output and memory diagrams.

Classes and Objects in C++: Beginner Tutorial with Runnable Examples
Build a precise mental model of C++ classes and objects with two Rectangles, a checked setter, exact output traces, common error fixes, and short exercises.

Strings in C++: Beginner Tutorial with Runnable Examples
Learn how std::string behaves through exact outputs, safe input patterns, a worked index trace, common traps, and three short practice problems.

References in C++: Syntax, Aliasing, and Runnable Examples
Build a reliable mental model of C++ references through state traces, parameter examples, const binding, pointer comparisons, and common error repairs.

Memory Layout of a C Program: Stack, Heap, Data, BSS and Text Explained
Place globals, static objects, literals, local variables, pointers and allocated values correctly using one runnable C program and an illustrative ELF/Linux map.

C++ Setup Tutorial: Install a Compiler and Run Your First Program
Set up a C++ compiler, turn main.cpp into an executable, and learn to diagnose the stage that failed. Two small programs make every command and value concrete.

Header Files and Linking in C: Build a Multi-File Program Step by Step
Build and debug a three-file C program while learning where declarations, definitions, external symbols, and storage belong.

C to C++ Transition: Syntax Changes, Classes and Runnable Examples
Move a working C record into an encapsulated C++ class, then replace common pointer, buffer, and allocation patterns with clearer C++ alternatives.