Keywords in C

Keywords are reserved words that already have a special meaning in C. You cannot normally use a keyword as your variable or function name.

Common keywords

auto, break, case, char, const, continue, default, do, double, else, enum, extern, float, for, goto, if, int, long, register, return, short, signed, sizeof, static, struct, switch, typedef, union, unsigned, void, volatile, while

Program showing keywords

#include <stdio.h>

int main() {
int age = 20;
const int limit = 60;

if (age < limit) {
printf(“Age is below the limit.”);
}

return 0;
}

 

OUTPUT
Age is below the limit.

 

⭐ EASY TIP: If C gives a syntax error when you try to name a variable something like int or return, check whether you accidentally used a keyword.
Scroll to Top