CodesJava

Easy learning with example program codes

CPP Keywords


There are a list of words already defined in CPP library, same as in C. These reserved words are called as CPP Keywords. Every keyword is defined to serve a specific purpose. These keywords when used in CPP codes performs a specific operation during compilation. A Keyword in CPP is restricted to be used as a variable, a function or an identifier.

Keywords used in CPP are listed below:

 

auto double int struct
break  else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while

Example:

#include <iostream.h>
using namespace std; 
int main()
{
int num;
cout << "Enter your age: ";
cin >> num;
cout << “You are ” << num << “ years old.”; 
return 0;
}

Output:

Enter your age: 10
You are 10 years old.
Posted in CPP   
Sign Up/ Sign In
Ask a Question


Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at hr@codesjava.com.

Development

We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on hr@codesjava.com.

Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki