Javascript required

C++ Keywords

Prev Next

Keywords are the words which convey special meaning to the compiler. These are the reserved for special purpose.

Example: case, do, break, for, while, int, long, catch, switch, static etc.
you could declare a variable called main inside your main function, initialize it, and then print out its value (but ONLY do that to verify that you can!). On the other hand, you could not do this with a variable named else. The difference is that else is a reserved word, while main is "only" a predefined identifier.

There are a total of 95 reserved words in C++. The reserved words of C++ may be conveniently placed into several groups. In the first group, we put those that were also present in the C programming language and have been carried over into C++. There are 32 of these.

There are another 30 reserved words that were not in C, are therefore new to C++ programming language.

There are 11 C++ reserved words that are not essential when the standard ASCII character set is being used, but they have been added to provide readable alternatives for a few of the C++ operators, and also to facilitate programming with character sets that lack characters required by C++.

Prev Next