An operator is a symbol that represent a specific action.Operators are used to perform operations on variables and values.
Assignment Operator is used to assign value to any variable. We can assign the value directly to the variable or after performing any operation we can assign value to variable. To assign value to variable '=' sign is used.
Example
Don't get confused while using single equal to( = ) sign or double equal to ( == ) sign. Single equal to sign is used for assignment but double equal to sign is used for compression
Output of the above code
No comments:
Post a Comment