what is an assignment statement??
Answers
Explanation:
An Assignment statement is a statement that is used to set a value to the variable name in a program.
Assignment statement allows a variable to hold different types of values during its program lifespan. Another way of understanding an assignment statement is, it stores a value in the memory location which is denoted by a variable name.
Syntax
The symbol used in an assignment statement is called as an operator. The symbol is ‘=’.
Note: The Assignment Operator should never be used for Equality purpose which is double equal sign ‘==’.
The Basic Syntax of Assignment Statement in a programming language is :
variable = expression ;
where,
variable = variable name
expression = it could be either a direct value or a math expression/formula or a function call
Answer:
In computer programming, an assignment statement sets and/or re-sets the value stored in the storage location denoted by a variable name; in other words, it copies a value into the variable. In most imperative programming languages, the assignment statement is a fundamental construct
Explanation: