Breaking

Post Top Ad

Your Ad Spot

Monday, January 1, 2018

Identifiers,Data Types and Syntax of C/C++ Language


Identifiers and Data Types will be Discussed in This Article. © CB9 Images
Identifiers:

The Identifiers are the names used to represent variables, constants, types, functions and labels in the program. A good identifier name should be descriptive but short.The basic rules for identifiers are as follows:
  • An Identifier in C++ may consist of 31 characters.
  • The first character must be an alphabetic or underscore (_).
  • The identifier name must consist of only alphabetic characters, digits or underscores. 
  • The Reserved word cannot be used as identifier name e.g, cout, cin etc

Types of Identifiers: 

There are two types of identifiers in C++ Language
  1. Standard Identifier
  2. User-Defined Identifier

Standard Identifier:

Standard Identifier has special name and meanings in C++ Language. cout and cin etc are Standard Identifiers. <iostrea.h> library is used for these identifiers.

User-Defined Identifier:

These Identifiers are made by the user. The User-Defined Identifiers are used to store data and program result. e.g, a, b, car, rollno etc are examples of this.

Keywords:

Keywords in C/C++ Programming Language are also called reserved words. These words have specific meanings and and purpose in C/C++ Programming Language. There are different types of keywords in C/C++ Programming Language. The total number of keywords is 63.

List of Keywords:

Asm
auto
bool
break
case
catch
char
class
const_cast
continue
default
delete
do
double
else
enum
dynamic_cast
extern
false
float
for
union
unsigned
using
friend
goto
if
inline
int
long
mutable
virtual
namespace
new
operator
private
protected
public
register
void
reinterpret_cast
return
short
signed
sizeof
static
static_cast
volatile
struct
switch
template
this
throw
true
try
typedef
typeid
unsigned
wchar_t
while

No comments:

Post a Comment

Post Top Ad

Your Ad Spot