CHAPTER 02 / 26
C Syntax
Understand the basic structure and syntax rules of a C program.
01 — Syntax
data_type variable = value;
02 — Example
#include <stdio.h>
int main() {
int number = 10;
printf("Number = %d", number);
return 0;
}03 — Important Points
- C statements normally end with a semicolon.
- Braces define blocks.
- C is case-sensitive.
04 — Common Mistakes
- Missing semicolons or braces.
- Using = when == is required for comparison.
05 — Real-World Use
Syntax rules form the foundation for every C program, from small exercises to large systems.
06 — Practice
Create a small program that demonstrates the main idea of C Syntax.