C++ is a strong language. In C++ we can compose structured programs and object-oriented programs also. C++ is a superset of C and in this manner most develops of C are lawful in C++ with their meaning unaltered.  Be that as it may, there are some exceptions and additions.

Token: When the compiler is handling the source code of a C++ program, each gathering of characters isolated by void area is known as a token. Tokens are the littlest individual units in a program. A C++ program is composed utilizing tokens. It has the following tokens:

  • Keywords
  • Identifiers
  • Constants
  • Strings
  • Operators

C++ keywords


Keywords (also known as reserved words) have unique meaning to the C++ compiler and are constantly composed or typed in short(lower) cases. Watchwords are words that the language utilizes for a special reason, such as void, int, public, etc. It can’t be utilized for a variable name or function name. The following is the table for the complete arrangement of C++ keywords.


C++ Keywords Lists
asm auto break case catch char class const
continue default delete do double else enum extern
float for friend goto if inline int long
new operator private protected public register return short
signed sizeof static struct switch template this throw
try typedef union unsigned virtual void volatile while

Note: The keywords not found in ANSI C are displayed here in boldface.


C++ keywords lists:-


asm: To declare that a block of code is to be passed to the constructing agent.

auto: A capacity class specifier that is utilized to characterize objects in a block.


break: Terminates a switch statement or a circle.


case: Used specifically inside a switch statement to indicate a match for the statement’s demeanor.


catch: Specifies activities taken when an exception happens.


char: Fundamental data type that characterizes character objects.


class: To declare a user-defined type that exemplifies data members and tasks or member functions.


const: To characterize objects whose worth will not alter throughout the lifetime of program execution.


continue:- Transfers control to the beginning of a loop.


default:- Handles expression values in a switch explanation that are not taken care of by case.


delete: Memory deallocation administrator.


do: indicate the beginning of a do-while statement in which the sub-statement is executed over and again until the worth of the articulation is logical-false.


double:  Fundamental data type used to characterize a floating-point number.


else: Used explicitly in an if-else statement.


enum: To pronounce a user-defined enumeration data type.


extern: An identifier indicated as extern has outside linkage to the block.


float:- Fundamental data type used to characterize a floating-point number.


for: Indicates the beginning of a statement to accomplish repetitive control.


friend: A class or activity whose execution can access the private data members of a class.


goto: Transfer control to a predefined label.


if: Indicate the beginning of an if statement to accomplish selective control.


inline: A function specifier that demonstrates to the compiler that inline substitution of the function body is to be liked to the standard function call execution.


int: Fundamental data type used to characterize integer objects.


long: A data type modifier that characterizes a 32-bit int or an extended double.


new: Memory distribution administrator.


operator: Overloads a c++ administrator with a new declaration.


private: Declares class individuals which are not noticeable outside the class.


protected: Declares class members which are private but to derived classes. 


public: Declares class members who are visible external the class.


register: A capacity class specifier that is an auto specifier, yet which likewise shows to the compiler that an object will be frequently utilized and ought to therefore be kept in a register.


return: Returns an item to a function’s caller.


short: A data type modifier that characterizes a 16-bit int number.


signed: A data type modifier that demonstrates an object’s sign is to be put away in the high-order bit.


sizeof: Returns the size of an item in bytes.


static: The lifetime of an object-defined static exists throughout the lifetime of program execution.


struct: To proclaim new types that exemplify both data and member functions.


switch: This keyword utilized in the “Switch statement”.


template: defined or generic type.


this:  A class pointer focuses to an object or case of the class.


throw: Generate a special case.


try: Indicates the beginning of a block of exception handlers.


typedef: Synonym for another basic or user-defined type.


union: Similar to a design, struct, in that it can hold various types of data, but a union can hold just one of its members at a given time.


unsigned: A data type modifier that demonstrates the high-order bit is to be utilized for an object.


virtual: A function specifier that pronounces a member function of a class that will be re-imagined by a derived class.


void: Absent of a type or function boundary list.


volatile: Define an object which might change in value in a way that is imperceptible to the compiler.


while: Start of a while statement and end of a do-while proclamation.


Previous                                                                          Next