C Tutorial — Learn C Programming
Key takeaway: This free C tutorial teaches you systems programming from scratch — variables, pointers, arrays, functions, structs, and memory management — with practical code examples you can compile and run.
C is a general-purpose, procedural programming language created in 1972. It is used for operating systems, embedded systems, game engines, and performance-critical applications. This tutorial is for beginners, CS students, and developers who want to understand how computers work at a low level.
Last updated: September 2026
Keywords and Identifiers in C
Keywords are reserved words in C that have special meanings and cannot be used as identifiers. Identifiers are names given to variables, functions, and other user-defined items.
C Keywords
C has 32 keywords that are reserved and cannot be used as variable names:
Identifiers
Identifiers are names given to variables, functions, arrays, etc. They must follow these rules:
Examples
// Valid identifiers
int age;
float _salary;
char firstName;
int student1;
// Invalid identifiers
int 2age; // starts with digit
float int; // keyword used
char first-name; // hyphen not allowedExplanation
- Keywords: Reserved words with special meaning (e.g.,
int,return) that you cannot use as variable names. - Identifiers: Names for variables, functions, etc. Must start with a letter or underscore and are case-sensitive.
- Naming conventions: Prefer descriptive names like
totalCountover single letters for readability. - Common mistakes: Starting with digits, using hyphens, or accidentally using a keyword as a name.
Keywords
Quick Tips
- Use consistent casing (camelCase or snake_case) across your codebase.
- Avoid underscores at the start for public names; use descriptive names instead.
- If you get a compiler error, check for misspelled identifiers or keywords used as names.