Search

VARIABLE IN C++

A variable is a value that can change anytime . It is a memory location used to store a data value . variable name is case sensitive.
  1. They must always begin with a letter , although some system permit underscore as the first character.
  2. The length of a variable most not be more than 8 character.
  3. white space is not allowed .
  4. a variable should not be a keyword.
  5. it should not contain any special characters.

example of invalid variable names are :
 
123 , (area) , -hello , %abc , etc.

A variable must be declared before it can be used . Variables can be declared at the start of any block of code . 

No comments:

Post a Comment

DATA TYPES

 "Data types specifies the type and size of data . " A program contains different types of data (integer , real , character etc.) ...