A keywords are the reserved words in programming language with a specific features for each keyword. Keywords always starts with the lower case and cannot be a variable name or constant name. These are predefined by the program and their value cannot be changed.
The following is the list of 30 keywords in C++ that are also available in C programming language.
The following is the list of 30 keywords in C++ that are not available in C programming language.
Identifiers are nothing but the name assigned to the entities such as variables, functions, arrays, or other user-defined data types. Identifiers are the basics need of programming language.
The name assigned to the entities is unique so that it can be identified during the execution of the program. Identifiers cannot be used as Keywords.
int number;, number being an identifier.
Rules for naming identifiers:
- Identifiers are case-sensitive that is uppercase and lowercase letters are distinct.
- The first letter of identifiers must be a letter or underscore. After the first letter, you can use digits.
- White spaces are not allowed.
- A keyword cannot be used as an identifier.
Some valid and invalid identifiers:
Number-2 //special character '-' is present.
3Sum //started with digit
int // int is a keyword