The _______________ allows you to abbreviate an assignment statement.

The _______________ allows you to abbreviate an assignment statement.
A. Arithmetic assignment operator
B. Shorthand operator
C. Long operator
D. Predefined operator
 
Answer: A
Explanation: The arithmetic assignment operators allow you to abbreviate an assignment statement that contains an arithmetic operator, as long as the assignment statement has the following format, in which variableName is the name of the same variable: variableName = variableName arithmeticOperator value. For example, you can use the addition assignment operator (+=) to abbreviate the statement intAge = intAge + 1 as follows: intAge += 1. Both statements tell the computer to add the number 1 to the contents of the intAge variable and then store the result in the intAge variable.
 

Tìm kiếm

Back
Top