Keywords/Constants in C

Keywords in C programming language

Keywords are predefined, reserved words used in programming that have special meanings to the compiler. Keywords are part of the syntax and they cannot be used as an identifier.

For example: int money; Here, int is a keyword that indicates ‘money’ is a variable of type integer.

Constants in C Programming Language

Like a variable, a constant is a data storage location used by your program. Unlike a variable, the value stored in a constant can’t be changed during program execution. C has two types of constants, each with its own specific uses:

Literal Constants

A literal constant is a value that is typed directly into the source code wherever it is needed. Here are two examples:

int count = 20;
float tax_rate = 0.28;

Symbolic Constants

A symbolic constant is a constant that is represented by a name (symbol) in your program. Like a literal constant, a symbolic constant can’t change. Whenever you need the constant’s value in your program, you use its name as you would use a variable name. The actual value of the symbolic constant needs to be entered only once, when it is first defined

circumference = 3.14 * (2 * radius);
area = 3.14 * (radius)*(radius);

Keywords in C Programming

Keywords in C Programming
constcontinuedefault
doubleelseenum
floatforgoto
intlongregister