by Dinesh Thakur Category: Object-oriented programming (OOP)

Every word in C++ language is a keyword or an identifier. Keywords in C++ language cannot be used as a variable name. They are specifically used by the compiler for its own purpose and they serve as building blocks of a C++ program. C++ language has some reserve words which are called keywords of C++ language. These are the part of the C++ Tokens.

There are 63 keywords currently defined for Standard C++. These are shown in Table. Together with the formal C++ syntax, they form the C++ programming language. Also, early versions of C++ defined the overload keyword, but it is obsolete. Keep in mind that C++ is a case-sensitive language and it requires that all keywords be in lowercase.

                                Keywords Used in C++


The name of a variable, function, class, or other entity in C++ is called an identifier. C++ gives you a lot of flexibility to name identifiers as you wish. However, there are a few rules that must be followed when naming identifiers:


• The identifier can not be a keyword. Keywords are reserved.

• The identifier can only be composed of letters, numbers, and the underscore character. That means the name can not contains no symbols (except the underscore) or whitespace.

• The identifier must begin with a letter or an underscore. It can not start with a number.

• C++ distinguishes between lower and upper case letters nvalue is different than nValue is different than NVALUE.

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles