Basic LevelC SYNTAX · C TrackCompiler: gcc -std=c17 -O2
C Basic Syntax & Control Flow
printf format specifiers, integer widths, if/else conditions, and loops.
Exercises:5 Practice Labs
All C ModulesBasic Coding Labs (5)Click any card to start in laboratory
Lab #01 · Basic Syntax
Easy5 mins
01. Formatted Output with printf & Specifiers
Learn format specifiers (%d, %s, %zu) using standard C printf.
Objective: Declare integer `code = 200` and string `status = 'OK'`. Print: `[+] HTTP Status: 200 OK`.
Interactive SandboxStart Lab
Lab #02 · Variables & Types
Easy6 mins
02. Primitive Types, Bitwise Ops & Modulo
Inspect integer sizes with `sizeof` and perform bitwise shifts `<<`.
Objective: Demonstrate that left-shifting `1 << 3` equals 8, and print the byte sizes of `int` and `double`.
Interactive SandboxStart Lab
Lab #03 · Control Flow
Easy8 mins
03. Conditionals & Switch-Case Branching
Evaluate system return codes using `if` and `switch` statements.
Objective: Write a function `const char* getStatusName(int code)` that maps 200 to 'SUCCESS', 404 to 'NOT_FOUND', 500 to 'SERVER_ERROR', and default to 'UNKNOWN'.
Interactive SandboxStart Lab
Lab #04 · Loops & Iteration
Easy10 mins
04. For & While Loops (Array Scanning)
Iterate across arrays using index bounds and while loops.
Objective: Write a function `int findMax(int arr[], int size)` in C that returns the maximum element in an integer array using a loop.
Interactive SandboxStart Lab
Lab #05 · Nested Loops
Easy10 mins
05. Nested Loops & Grid Patterns
Construct 2D grids and patterns with nested loop structures.
Objective: Print a 3x3 identity matrix with 1s on the diagonal and 0s elsewhere.
Interactive SandboxStart Lab