C++ Keywords:
- A reserved word with special meaning
- Keyword is a program that can be used directly to do some operations.
- A list of keywords as shown below
| Alignas | decltype | namespace | struct | alignof | default | new | switch |
| And | delete | noexcept | template | and_eq | do | not | this |
| Asm | double | not_eq | thread_local | auto | dynamic_cast | nullptr | throw |
| Bitand | else | operator | true | bitor | enum | or | try |
| Bool | explicit | or_eq | typedef | break | export | private | typeid |
| Case | extern | protected | typename | catch | false | public | union |
| Char | float | register | unsigned | char16_t | for | using | friend |
| Return | virtual | class | goto | short | void | compl | if |
| Volatile | const | inline | sizeof | constexpr | int | static | whil |
| Long | static_assert | xor | continue | mutable | static_cast | xor_eq | signed |
C++ Identifiers
- Every Data member has unique identity in C++ Program
- Identities applied to Variables, Classes, Functions and other entities
- Identifier must follow rules
- Identifiers can be composed of letters, digits, and the underscore character.
- It has no limit on name length.
- It must begin with either a letter or an underscore.
- It is case-sensitive.
- We cannot use keywords as identifiers.
- We can choose any name as an identifier if we follow the above rules. However, we should give meaningful names to the identifier that makes sense.
| Invalid Identifier | Bad Identifier | Good Identifier |
| Total points | T_points | totalPoint |
| 1list | list_1 | list1 |
| Float | n_float | floatNumber |