[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CDecrementOperator
Its opposite operator is the increment operator, ++.
There are three ways to decrement a value by 1:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CDecrementOperator
(C) -- operator
The decrement operator is used to lower an int's value by one.Its opposite operator is the increment operator, ++.
int i = 1; i--; assert(i==0);
- include <assert.h>
There are three ways to decrement a value by 1:
1) i = i - 1; 2) i -= 1; 3) i--;
'Decrement operator' links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
