VARIABLES AND COMMENTS(L-2)
1.Variables --> They are like the containers to store data
for e.g, we give a certain value to a aplhabet in c++
like "int A=12 ; B=15" etc. Here A and B are the variables
to which we have given our values 12 and 15.
Types of variables [in built in datatype]--> 1.int e.g- 1,2,-3,-1....
2.float e.g- 1.2,4.3,5.5...
3.char e.g- a,s,d,e,......
4.double e.g-
1.2345,234.3222,3222.3332.....
5.boolean e.g- T or F, [ture=1 ;
false=0]
2.Comments -->They are generally used by the programmer to specify are certian
code
DENOTED BY -->// for single line
-->/* text */ for multilines or single line
3.Low level -->It is the process which goes on the level of binary language.
4.High level -->It is the process which we see on our screen -->e.g - searching on
google, downloading the file or something.
RULES FOR NAMING THE VARIABLES
1. VARIABLES NAMES CAN RANGE FROM 1 TO 255 CHARACTERS.
2. ALL VARIABLES NAMES MUST BEGIN WITH A ALPHABET, LETTER OR AN UNDERSCORE9(_).
3. AFTER THE INITIAL LETTER, VARIABLE NAMES CAN ALSO CONTAIN LETTERS AND NUMBERS.
4. VARIABLE NAMES ARE CASE SENSITIVE.
5. NO SPACE OR SPECIAL CHARACTERS ARE ALLOWED
6. YOU CANT USE C++ RESERVED KEYWORDS(INT , FLOAT , CHAR ...).
1.Variables --> They are like the containers to store data
for e.g, we give a certain value to a aplhabet in c++
like "int A=12 ; B=15" etc. Here A and B are the variables
to which we have given our values 12 and 15.
Types of variables [in built in datatype]--> 1.int e.g- 1,2,-3,-1....
2.float e.g- 1.2,4.3,5.5...
3.char e.g- a,s,d,e,......
4.double e.g-
1.2345,234.3222,3222.3332.....
5.boolean e.g- T or F, [ture=1 ;
false=0]
2.Comments -->They are generally used by the programmer to specify are certian
code
DENOTED BY -->// for single line
-->/* text */ for multilines or single line
3.Low level -->It is the process which goes on the level of binary language.
4.High level -->It is the process which we see on our screen -->e.g - searching on
google, downloading the file or something.
RULES FOR NAMING THE VARIABLES
1. VARIABLES NAMES CAN RANGE FROM 1 TO 255 CHARACTERS.
2. ALL VARIABLES NAMES MUST BEGIN WITH A ALPHABET, LETTER OR AN UNDERSCORE9(_).
3. AFTER THE INITIAL LETTER, VARIABLE NAMES CAN ALSO CONTAIN LETTERS AND NUMBERS.
4. VARIABLE NAMES ARE CASE SENSITIVE.
5. NO SPACE OR SPECIAL CHARACTERS ARE ALLOWED
6. YOU CANT USE C++ RESERVED KEYWORDS(INT , FLOAT , CHAR ...).