- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Reserved keywords in C++?
A reserved word is a word that cannot be used as an identifier, such as the name of a variable, function, or label – it is "reserved from use". This is a syntactic definition, and a reserved word may have no meaning.
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 more readable alternatives for a few of the C++ operators, and also to facilitate programming with character sets that lack characters required by C++.
Here is a list of all these reserved words −
|alignas (since C++11)||alignof (since C++11)||and|
|atomic_cancel (TM TS)||atomic_commit (TM TS)||atomic_noexcept (TM TS)|
|catch||char||char16_t (since C++11)|
|char32_t (since C++11)||class(1)||compl|
|concept (since C++20)||const||constexpr (since C++11)|
|const_cast||continue||co_await (coroutines TS)|
|co_return (coroutines TS)||co_yield (coroutines TS)||decltype (since C++11)|
|if||import (modules TS)||inline(1)|
|int||long||module (modules TS)|
|noexcept (since C++11)||not||not_eq|
|nullptr (since C++11)||operator||or|
|requires (since C++20)||return||short|
|static_assert (since C++11)||static_cast||struct(1)|
|switch||synchronized (TM TS)||template|
|this||thread_local (since C++11)||throw|
- What are reserved keywords in C#?
- What are Reserved Keywords in Python?
- What is the difference between keywords and reserved words in Java?
- HTML reserved Attribute
- Keywords in C#
- Keywords in Python
- Keywords in Java
- C++ Keywords
- Important Keywords in C#
- What are Reserved Words in Python?
- Is name a reserved word in MySQL?
- Variables and Keywords in C
- char vs string keywords in C#
- What are contextual keywords in C#?