Home / Computer Courses / Use of Keywords in C++ Language

Use of Keywords in C++ Language

Use of Keywords in C++ Language


Keywords in C++ Language have predefined purpose and meaning. The developers of the language defines these purpose and meaning of a keyword. User cannot Change and redefined the meaning or conditions of the keywords. So keywords use only for that purpose for which they define. Keywords are also know as reserved words. There are 63 keywords in C++ language.

keywords in c++ languages


Before Going Next, We Have Some Recommended for you!!!

List and description:

List and description of the some keywords are as follows:

Keywords Description
asm It is used to add assembly instructions.
auto It is used to declare a local variable.
bool Declare a Boolean variable.
break It is used to breakout from the loop or any other body in the program
case It is used in switch statement.
catch It is used to handle exceptions from throw.
char It is used to declare a variable
class This keyword declare a class
const It is used to declare a variable or function that does not change.
continue It is used for bypass iteration of loop
default Default is used in switch statements when all cases are wrong.
delete It is used to make dynamic memory available.
do It is used for do-while loop construction.
double Used to declare a double precision float variable.
else Else is alternative case of ‘if’.
enum It creates the enumerations data types.
false It represents the false value of Boolean variable.
for It uses for for-loop construction
float It use to declare a floating point variable.
long ‘long’ declare the long integer variable
if It executes the code on the base of some conditions.
int It use to declare integer variables.
goto It use to jump to different parts of the program.
or It is alternative method or ||
struct It defines a new structure
new It allocated the dynamic memory for a new variable.
operator It creates the overloaded functions.
private It is used to declare a class as a private
this It is pointer to the current variable.
while It is used for the while-loop construction.

About Shumaiza Asghar

Shumaiza Asghar

Check Also

errors and types of errors

Error And Types Of Errors in C++ Language

Error And Types Of Errors in C++ Language Errors: Error in a program known as …

Leave a Reply

Your email address will not be published. Required fields are marked *