English, asked by beardo97, 10 months ago

a=a-1 is equivalent what

Answers

Answered by arghyamallik51
0

Answer:

a = a - 1 is equivalent to the

a - -

Answered by jubin22sl
0

Answer: The answer is a--.

Postfix Operator: Postfix operators are unary operators that work on a single variable and can be used to increase or decrement a value by one. These operators can also be used to perform other mathematical operations (unless overloaded). ++ and — are the two different postfix operators that can be used in C++

Explanation:

  • Consider a = 10
  • the operation a-- is equivalent to a = a-1.
  • if it is conducted in a code of C or C++
  • note: a should be declared as integer variable
  • so is a's value is updated by a = 10 to a = 10 -1 = 9
  • the new value of a will be 9 after the postfix operation a--.

#SPJ2

Similar questions