Keywords in C++ programming Language





Keywords in C++

Catchphrases are those words whose importance is now characterized by Compiler. These watchwords can't be utilized as an identifier. Note that catchphrases are the accumulation of saved words and predefined identifiers. Predefined identifiers will be identifiers that are characterized by the compiler however can be changed in importance by the client.

For instance, you could proclaim a variable called principle inside your primary capacity, instate it, and after that print out its esteem (however ONLY do that to check that you can!). Then again, you couldn't do this with a variable named else. The thing that matters is that else is a held word, while primary is "just" a predefined identifier.

There are a sum of 95 held words in C++. The held expressions of C++ might be strategically located into a few gatherings. In the primary gathering, we put those that were additionally present in the C programming dialect and have been persisted into C++. There are 32 of these.

There are another 30 saved words that were not in C, are in this way new to C++ programming dialect.

There are 11 C++ saved words that are not fundamental when the standard ASCII character set is being utilized, however they have been added to give meaningful options in contrast to a couple of the C++ administrators, and furthermore to encourage programming with character sets that need characters required by C++.

Here is a rundown of all these saved words:



alignas (since C++11)doublereinterpret_cast
alignof (since C++11)dynamic_castrequires (since C++20)
andelsereturn
and_eqenumshort
asmexplicitsigned
atomic_cancel (TM TS)export(1)sizeof(1)
atomic_commit (TM TS)extern(1)static
atomic_noexcept (TM TS)falsestatic_assert (since C++11)
auto(1)floatstatic_cast
bitandforstruct(1)
bitorfriendswitch
boolgotosynchronized (TM TS)
breakiftemplate
caseimport (modules TS)this
catchinline(1)thread_local (since C++11)
charintthrow
char16_t (since C++11)longtrue
char32_t (since C++11)module (modules TS)try
class(1)mutable(1)typedef
complnamespacetypeid
concept (since C++20)newtypename
constnoexcept (since C++11)union
constexpr (since C++11)notunsigned
const_castnot_equsing(1)
continuenullptr (since C++11)virtual
co_await (coroutines TS)operatorvoid
co_return (coroutines TS)orvolatile
co_yield (coroutines TS)or_eqwchar_t
decltype (since C++11)privatewhile
default(1)protectedxor
delete(1)publicxor_eq
                       do                  register(2)

Comments