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
- Standard Identifier
- 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:
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