Arithmetic assignment operator
Shorthand operator
Long operator
Predefined operator
Answer is Right!
Answer is Wrong!
The correct answer is: B. Shorthand operator
A shorthand operator is an operator that allows you to abbreviate an assignment statement. For example, the assignment statement x = y + z
can be abbreviated as x += z
.
The other options are incorrect because:
- An arithmetic assignment operator is an operator that performs an arithmetic operation and assigns the result to a variable. For example, the arithmetic assignment operator
+=
adds the value of the right-hand operand to the value of the left-hand operand and assigns the result to the left-hand operand. - A long operator is an operator that performs a long operation. For example, the long operator
strlen()
returns the length of a string. - A predefined operator is an operator that is defined by the programming language. For example, the predefined operator
+
adds two numbers.