C

13 articles in this topic

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.

Updated 18 Aug 20266 min readC

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.

Updated 16 Aug 20267 min readC

Strings in C Tutorial: Declaration, Input, Functions and Worked Examples

Learn how C strings use character arrays and the null terminator, then practise safe input, traversal, reversal, library calls and capacity checks.

Updated 13 Aug 20266 min readC

Multidimensional Arrays in C: 2D Arrays, Row-Major Memory and Runnable Examples

Learn how C lays out and traverses fixed-size multidimensional arrays. A complete 3-by-4 sales program connects indexing, totals, addresses and function parameters.

Updated 11 Aug 20267 min readC

Operators and Precedence in C: Step-by-Step Tutorial with Runnable Examples

Learn how C groups arithmetic, relational, logical, bitwise, conditional, and assignment operators. Trace exact outputs and repair common expression mistakes.

Updated 9 Aug 20266 min readC

Input and Output in C: printf, scanf, fgets and Worked Examples

Learn how C moves text through standard streams, how format strings control conversion, and why checked line input is safer. The worked programs trace every input, return value and output.

Updated 7 Aug 20266 min readC

Conditionals in C: if, if-else, else-if and switch with runnable examples

Learn how C chooses a path through a program. Predict and trace complete examples covering conditions, ladders, logical operators, nesting and switch.

Updated 4 Aug 20266 min readC

STL Overview in C++: Containers, Iterators and Algorithms with Runnable Examples

Build a practical STL mental model, then trace seven scores through sorting, searching, filtering and aggregation. The same data clarifies map, set and priority_queue choices.

Updated 2 Aug 20268 min readC

Command Line Arguments in C: argc and argv Tutorial with Runnable Examples

Learn how argc and argv carry command line input into a C program, then practise argument tracing, numeric conversion, validation, and common fixes.

Updated 30 Jul 20265 min readC

C Tutorial: The Complete Learning Path from First Program to Pointers and Projects

Learn C in dependency order, from compiling your first program to understanding pointers, allocating memory, reading files, and completing a useful project.

Updated 27 Jul 20266 min readC

File Handling in C: fopen Modes, fscanf vs fgets and the Predict-the-Output Questions

Trace one text file byte by byte to see what fopen returns, where fscanf stops, why fgets may read a blank line and how to write a correct input loop.

Updated 25 Jul 20267 min readC

Structures and Unions in C: Padding, Alignment and Worked sizeof Problems for GATE

Calculate structure and union sizes byte by byte, see where padding enters, and learn how member order changes the result.

Updated 22 Jul 20267 min readC