UNIT 2 2.7 Assignment Statement Flashcards
1
Q
It is the process of assigning a value to a variable. In C, we use the equal sign
(=) as the assignment operator
A
Assignment
2
Q
How to Assign Values to Variables
A
- The variable must be on the left side of the equal sign. Values must be on the right side of the
equal sign. - Any expression can be assigned on the variable.
- Expressions are not allowed on the left side of the assignment operator
Example X = 31; sum = a + b; Name = “Paolo”; K = ‘B’;