Keywords in C++

Learn about the reserved list of keywords in C++.

We'll cover the following

Introduction to keywords

Keywords are a collection of reserved words and predefined identifiers in C++. We cannot use keywords as an identifier or a function name.

📝 Do you know?

The identifiers that are defined by the compiler are known as predefined identifiers. We can change their meaning later in a program. The main keyword is a predefined identifier. We can declare a variable called main inside our function. However, we cannot do the same thing with the else keyword because it is a reserved word.

Here is a list of commonly used keywords in C++.

Get hands-on with 1200+ tech skills courses.