Increment and Decrement Operators - Research Article from World of Computer Science

This encyclopedia article consists of approximately 2 pages of information about Increment and Decrement Operators.

Increment and Decrement Operators - Research Article from World of Computer Science

This encyclopedia article consists of approximately 2 pages of information about Increment and Decrement Operators.
This section contains 419 words
(approx. 2 pages at 300 words per page)
Buy the Increment and Decrement Operators Encyclopedia Article

Increment operators and decrement operators are shorthand methods employed in programming languages such as C++ and Octave for writing frequently occurring operations. They function to increase or decrease the numeric type of variable.

There are a number of operators that can be applied in an incremental or decremental fashion. These are:

  • ++; counter++, or ++counter; Adds one to the variable and stores the new number in that variable.
  • - - ; counter - -, or - - counter; Subtracts one from the variable and stores the new number.
  • +=; counter +=specified number; Adds the number to the variable and stores the new number.
  • _=; counter _=specified number; Adds the number to the variable and stores the new number.
  • *=; counter *=specified number; Multiplies the variable by the number and stores the new number.
  • /=; counter /=specified number; Divides the variable by the number and...

(read more)

This section contains 419 words
(approx. 2 pages at 300 words per page)
Buy the Increment and Decrement Operators Encyclopedia Article
Copyrights
Gale
Increment and Decrement Operators from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.