Posted By:
2 Jul, 2013 4:30 am PDT

Variables and Identifiers in C++

What are variables and identifiers? What is the use of them?
Attachment:None


We define a variable as a portion of the memory to store a determined value. Each variable needs an identifier to differentiate a value from another. We can name the variable in any way we want as long it is a valid identifier. A valid identifier is a sequence of one or more letters, digits or underscore characters (_).Neither spaces nor punctuation marks or symbols can be part of an identifier. Variable identifiers always have to begin with a letter or with an underscore character. And the variable name should not be a Keyword. Keywords are reserved identifiers used for particular purposes by the compiler.

Eg: break,int,float,etc..

Note: Identifiers are CASE SENSITIVE.

Was it useful?  




Please login to reply to this problem.