Skip to main content

Basic Operators

C

// Increment (By one)
a++; // Postfix - Takes effect after its call
++a; // Prefix - Takes effect before its call

// Decrement (By one)
a--; // Postfix - Takes effect after its call
--a; // Prefix - Takes effect before its call

Back to top

C++ (Cpp)

// Increment (By one)
a++; // Postfix - Takes effect after its call
++a; // Prefix - Takes effect before its call

// Decrement (By one)
a--; // Postfix - Takes effect after its call
--a; // Prefix - Takes effect before its call

Back to top

C# (Csharp)

// Increment (By one)
a++; // Postfix - Takes effect after its call
++a; // Prefix - Takes effect before its call

// Decrement (By one)
a--; // Postfix - Takes effect after its call
--a; // Prefix - Takes effect before its call

Back to top

Java

// Increment (By one)
a++; // Postfix - Takes effect after its call
++a; // Prefix - Takes effect before its call

// Decrement (By one)
a--; // Postfix - Takes effect after its call
--a; // Prefix - Takes effect before its call

Back to top

Rust

// TODO

Back to top

Go

// TODO

Back to top

Javascript

// TODO

Back to top

Typescript

// TODO

Back to top

Python

# Increment
# Not Available. You need to use the Addition Operator
a = a + 1

# Decrement
# Not Available. You need to use the Subtraction Operator
a = a - 1

Back to top