C Programming & Data Structures
46 articles in this topic

Introduction to Flowcharts: Symbols, a Worked Example and Exam Traps
Learn how flowchart symbols express sequence, decisions and loops. Then trace a complete even-sum example, translate it into C and repair common logic defects.

Undefined Behavior in C: Common Causes, Examples, and Fixes
Learn to find the first undefined operation in common C programs, repair the missing invariant, and verify the corrected result with worked examples.

Structures in C: Syntax, Member Access and Worked Examples
Learn how C structures group related values, then trace object and pointer access through complete, implementation-safe examples.

Functions in C: Syntax, Parameters and Worked Examples
Learn how C declarations, calls, and definitions fit together. Compile two complete programs, follow their values, and trace composition and recursion.

Smart Pointers in C++: unique_ptr, shared_ptr and weak_ptr with Worked Examples
Learn who owns a C++ object, when it is destroyed, and how to choose among unique_ptr, shared_ptr, weak_ptr and a borrowed raw pointer.

Pointers in C: Addresses, Arrays and Functions with Worked Examples
Build a practical pointer model with runnable C programs for dereferencing, arrays, swapping, dynamic memory and common tracing questions.

Pointers and Arrays in C: Decay, Indexing and Worked Examples
Separate arrays from pointers with runnable traces covering indexing, one-past boundaries, function parameters, two-dimensional arrays and declaration traps.

Function Pointers in C: Declarations, Callbacks and Runnable Examples
Learn to read function-pointer declarations, build a callback dispatch table, guard invalid selections, and write a safe qsort comparator in C.

Call by Value, Address and Reference: C and C++ Worked Examples
Learn what C actually copies during a function call, how pointers still change caller-owned data, and where C++ references differ. Every case is traced to its final value.

C Language Concepts Explained: A Worked Program from Variables to Pointers
Follow a small C program from its declarations to its final output. The trace connects expressions, loops, functions, arrays and pointer behaviour step by step.

C Structures: Declaration, Initialization and Union Comparison with Worked Examples
Learn what a structure declaration creates, how each initializer form behaves, and why a union makes a different storage promise. Worked traces cover pointers, copying, padding and tagged unions.

Basic Recursion in C: Call Stack, Worked Traces and Exam Patterns
Learn how recursive C functions descend, stop and unwind. Trace factorial and printed output, count Fibonacci calls, and compare recursion with iteration.