Computer Science, asked by supercell250906, 6 months ago

difference between ++ and - -​

Answers

Answered by Keerthana2310
0

++ is increment operator whereas -- is decrement operator

Answered by Anonymous
4

Answer:

Hey ♥️✌️

Explanation:

✏️In programming (Java, C, C++, JavaScript etc. ), the increment operator ++ increases the value of a variable by 1. Similarly, the decrement operator -- decreases the value of a variable by 1.

  • ✏️If you use the ++ operator as prefix like: ++var. The value of var is incremented by 1 then, it returns the value.
  • ✏️If you use the ++ operator as postfix like: var++. The original value of var is returned first then, var is incremented by 1.

  • ✏️The -- operator works in a similar way like the ++ operator except it decreases the value by 1.

✒️Hope it helps ✌️☺️♥️...

Tag me brainliest ✌️...

Similar questions