Author: web-admin

Chapter 5: Operators in C

1. Arithmetic Operators These are used for mathematical calculations. Operator Name Example Result (if a=10, b=3) + Addition a + b 13 – Subtraction a – b 7 * Multiplication a * b 30...

Chapter 6: Decision Making (Control Flow)

1. if Statement (Simple Decision) Syntax: C

Condition must be something that is true (non-zero) or false (zero). Example: C

Sample Output: If you enter 20 → “You are eligible to vote!”...

Chapter 7: Loops in C

C gives us three main types of loops: for loop while loop do…while loop We will also learn nested loops, break, and continue. 1. for Loop Best when you know how many times you...

Chapter 8: Arrays

1. What is an Array? Array is a collection of elements of the same type All elements are stored in contiguous (next to each other) memory locations Each element has an index starting from...

Chapter 9: Strings in C

A string in C is simply a collection of characters (letters, numbers, symbols) that ends with a special character called null terminator (\0). In C, there is no built-in string type like in Python...

Chapter 10: Functions

Functions let you organize your code, reuse it, and make your program clean and easy to understand. Think of a function as a small machine: You give it some input (parameters) It does some...

Chapter 11: Pointers

Once you master pointers, you will understand how memory really works in C, and it will make learning data structures, dynamic memory, file handling, and even C++ much easier. Let’s go slowly and carefully...

Chapter 12: Dynamic Memory Allocation

This is one of the most powerful features of C. Until now, we declared arrays and variables with fixed size at compile time (like int arr[100];). But what if we don’t know how many...

Chapter13: Structures and Unions

This is one of the most powerful and useful features in C. Structures let you create your own custom data type by grouping different types of data together – like a real-world object. Think...

Chapter 14: File Handling

This is one of the most important and practical topics in C programming. Until now, all our data was lost when the program ended. With file handling, we can save data permanently on the...