Programming Fundamentals - Lecture 02
Programming Fundamentals - Lecture 02
Name
Type
Size
Value
Rules for naming a variable
First character of a variable name must be an alphabet
or underscore
Blank spaces are not allowed
Special characters (+, *) and reserved words cannot be
used as a variable name
A variable name declared for 1 data type cannot be used
for another data type
C++ is case sensitive language so var1 and Var1 are two
separate variables
Variable Initialization
Assignment Operator
The = sign doesnt mean that the left-hand side is
equal to the right-hand side.
Addition (+)
Subtraction (-)
Multiplication (*)
Division (/)
Remainder (%)
Precedence
To evaluate the expression, we need to follow the precedence
rule which is as follows: