Learn C
#include "gettingstarted/keywords_identifiers.h"

Keywords and Identifiers in C

#concept

Keywords are words C owns permanently — int, if, return, while, struct, and roughly 30 others (a few more per standard) — and they can never be reused as names. Identifiers are the names you invent: they must start with a letter or underscore, followed by letters, digits, or underscores.

C is case-sensitive, so total, Total, and TOTAL are three different names. Leading underscores are reserved territory (library and compiler internals use them), so never invent identifiers like _Foo or __bar — your code can silently collide with the implementation.

#how it works
1

What counts as a keyword

A fixed reserved word such as int, for, struct, or return — always meaningful, never usable as a variable or function name.

2

What counts as an identifier

Any name you invent, starting with a letter or underscore, continuing with letters, digits, and underscores.

3

Case sensitivity

count and Count are completely different identifiers — pick one style and stay consistent.

4

Reserved patterns

Leading double underscores and leading underscore plus capital belong to the implementation — treat them as off-limits.

#example
#include <stdio.h>
 
int main(void) {
int player_score = 10;
int Player_score = 20;
printf("%d vs %d\n", player_score, Player_score);
return 0;
}
Output
10 vs 20
1int and return are keywords — naming a variable int would fail to compile.
2player_score and Player_score differ in one capital, so they are two independent variables.
3printf with two %d placeholders prints both values, proving the names hold separate data.
#use cases
Understanding expected identifier errors pointing at misused keywords
Catching Score/score mix-up bugs
Following snake_case convention for new names
Avoiding reserved _Capital names that could clash with libc internals

Recommended resourcesAffiliate links · may earn us a commission

Recommended for learners

Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses Pro code editor & AI assistantWrite, debug and explain code faster while you practice the patterns here.Try it free Classic DSA interview booksThe reference books interviewers themselves learned from — great next to the visualizers.See the books

Practice what you learned

Re-implement each visualized algorithm in C yourself — building beats watching.