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 (constkeyword) and why immutability matters. -
05_operators.c
Examples of arithmetic, assignment, comparison, and logical operators. -
06_booleans.c
Demonstrates boolean logic in C using_Boolor<stdbool.h>. -
07_if_else_loops.c
Decision making withif,else if, andelse. -
08_while_loops.c
Shows the use ofwhileloops for repeated execution based on conditions. -
09_for_loops.c
Demonstratesforloops 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 theswitchstatement.
Using GCC:
gcc 01_hello_world.c -o hello
./hello
## How to Compile & Run
Using GCC:
```bash
gcc 01_hello_world.c -o hello
./helloWindows (Dev-C++ / TDM-GCC):
gcc 01_hello_world.c -o hello.exe
hello.exe```