This folder contains step-by-step C programs, starting from the basics and moving toward intermediate concepts.
Each file is numbered for easy navigation, so learners can follow the sequence like a tutorial series.
-
01_hello_world.c
Prints"Hello, World!"
to the screen. The first program for every C learner. -
02_variables.c
Shows how to declare variables (int
,float
,char
) and print their values usingprintf()
. -
03_data_types.c
Demonstrates different data types in C (int, float, double, char) and their storage sizes. -
04_constants.c
Introduction to constants (const
keyword) and why immutability matters. -
05_operators.c
Examples of arithmetic, assignment, comparison, and logical operators. -
06_booleans.c
Demonstrates boolean logic in C using_Bool
or<stdbool.h>
. -
07_if_else_loops.c
Decision making withif
,else if
, andelse
. -
08_while_loops.c
Shows the use ofwhile
loops for repeated execution based on conditions. -
09_for_loops.c
Demonstratesfor
loops with counters and iterations. -
10_arrays.c
Introduction to arrays: declaring, initializing, and accessing elements. -
11_user_input.c
Usingscanf()
to take input from the user. -
12_switches.c
Control flow using theswitch
statement.
Using GCC:
gcc 01_hello_world.c -o hello
./hello
## How to Compile & Run
Using GCC:
```bash
gcc 01_hello_world.c -o hello
./hello
Windows (Dev-C++ / TDM-GCC):
gcc 01_hello_world.c -o hello.exe
hello.exe```