C Programming notes

12 chapter notes, in syllabus order. Each starts with the key points.

Unit 1 · 6 hrs

C Basics: Compilers, Syntax, Hello World & IDEsUnit 1 of C Programming introduces the language’s core concepts: how compilers translate code, the anatomy of a C program (preprocessor, main(), libraries), syntax rules, and setting up development tools like GCC and Code::Blocks. Learn through a "Hello World" trace, IDE workflows, and real-world compiler errors.6 min read

Unit 2 · 8 hrs

Data Types, Variables, Constants: Fundamentals & Usage in CUnit 2 of C Programming covers fundamental building blocks—data types, variables, and constants—explaining their syntax, storage, and practical applications in programs, with real-world ties to Nepalese tech (e.g., Ncell billing, Daraz inventory) and exam-focused traces.11 min read

Unit 3 · 6 hrs

Operators & Expressions: Types, Precedence, Side Effects & Real-World MathUnit 3 of C Programming covers arithmetic/logical operators, operator precedence, expressions, type casting, and side effects with visual traces of how they work in memory and code—linked to real systems like eSewa’s transaction math and Ncell’s billing calculations.11 min read

Unit 4 · 8 hrs

Control Structures (Selection): if-else, switch, nested conditionsUnit 4 of C Programming covers decision-making in programs using if, if-else, else-if, switch-case, and nested conditions. Learn syntax, logical operators, and how to structure branching logic for real-world scenarios like loan approvals, menu-driven apps, and traffic signal control.11 min read

Unit 5 · 10 hrs

Loops & Iteration in C: for, while, do-while, break, continueUnit 5 of C Programming covers iterative control structures—for, while, do-while loops, and their modifiers (break, continue, goto)—with step-by-step traces, real-world applications (e.g., Pathao’s order processing), and comparisons of efficiency, readability, and use cases.14 min read

Unit 6 · 10 hrs

Functions in C: Definition, Types, Scope, Recursion & Practical UseUnit 6 of C Programming covers functions—how to define, call, and use them in programs, including parameter passing, scope rules, recursion, and real-world applications like transaction processing in eSewa or order routing in Daraz.12 min read

Unit 7 · 8 hrs

Arrays, Strings & Their Operations in C: Syntax, Traversal, Sorting, SearchingUnit 7 of C Programming covers arrays (1D/2D), strings (character arrays), their initialization, traversal, sorting (bubble/selection), searching (linear/binary), and practical applications like data storage and text processing in real-world systems.9 min read

Unit 8 · 10 hrs

Pointers, Dynamic Memory & Memory Management in CUnit 8 of C Programming covers pointers (addresses, dereferencing, pointer arithmetic), dynamic memory allocation (malloc, calloc, realloc, free), memory leaks, dangling pointers, and real-world applications in data structures and system-level programming.12 min read

Unit 9 · 8 hrs

Structures, Unions, Enums: Organizing Data in CUnit 9 of C Programming covers structures (custom data types combining variables), unions (memory-sharing alternatives), and enumerations (named integer constants). Learn how to define, access, and use them, with real-world examples from banking, e-commerce, and traffic systems.6 min read

Unit 10 · 6 hrs

File Handling in C: Operations, Modes, and Practical ApplicationsUnit 10 of C Programming covers file handling concepts, including file types, modes of opening files, standard file operations (read/write), error handling, and practical applications like data persistence in real-world systems. Learn with visual traces, code examples, and real-world ties to Nepalese apps like eSewa an9 min read

Unit 11 · 4 hrs

C Graphics: Pixels, Coordinates, and Drawing BasicsUnit 11 of C Programming introduces fundamental graphics programming in C, covering pixel manipulation, coordinate systems, and basic drawing techniques using libraries like graphics.h. This note explains how to plot points, draw lines, shapes, and text, with real-world applications in visualization tools and games.9 min read

Unit 12 · 8 hrs

Review & Practical Sessions: C Programming MasteryUnit 12 of C Programming consolidates all 11 units into a comprehensive review of syntax, logic, and problem-solving, with practical coding exercises (arrays, pointers, file handling) and debugging techniques for TU exams. Covers common pitfalls, optimization tips, and full program examples (e.g., student record system5 min read