Dev C++ Math Operators

The built-in unary plus operator returns the value of its operand. The only situation where it is not a no-op is when the operand has integral type or unscoped enumeration type, which is changed by integral promotion, e.g, it converts char to int or if the operand is subject to lvalue-to-rvalue, array-to-pointer, or function-to-pointer conversion. The builtin unary minus operator calculates. Operators in C - An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. C is rich in built-in operators and provide the fol. C: Mathematical Operators Operators are simply symbols that perform a certain function - some of these perform mathematical functions. In this tutorial, we're going to build on your knowledge of user input, outputting data, and variables, to learn about some of the basic mathematical operators.

Dev C Math Operators List

  • C Programming Tutorial
  • C Programming useful Resources

Dev C Math Operators Pdf

  • Selected Reading

The following table shows all the arithmetic operators supported by the C language. Assume variable A holds 10 and variable B holds 20, then −

OperatorDescriptionExample
+Adds two operands.A + B = 30
Subtracts second operand from the first.A − B = -10
*Multiplies both operands.A * B = 200
/Divides numerator by de-numerator.B / A = 2
%Modulus Operator and remainder of after an integer division.B % A = 0
++Increment operator increases the integer value by one.A++ = 11
--Decrement operator decreases the integer value by one.A-- = 9
Ctc math

Example

Try the following example to understand all the arithmetic operators available in C −

When you compile and execute the above program, it produces the following result −