What is an assignment statement? Explain with an example.
Answers
Answered by
2
Answer:
An assignment statement gives a value to a variable. For example, x = 5; ... the variable may be a simple name, or an indexed location in an array, or a field (instance variable) of an object, or a static field of a class; and. the expression must result in a value that is compatible with the type of the variable .
Answered by
2
Answer:
An assignment statement gives a value to a variable. For example, x = 5; ... the variable may be a simple name, or an indexed location in an array, or a field (instance variable) of an object, or a static field of a class; and. the expression must result in a value that is compatible with the type of the variable .
Similar questions
Social Sciences,
2 months ago
CBSE BOARD X,
2 months ago
English,
2 months ago
English,
5 months ago
Science,
5 months ago
Math,
10 months ago
Geography,
10 months ago
English,
10 months ago