Tuesday, 24 February 2015

Procedural Programming ( operators)

Arithmetic Operators

The fundamental arithmetic operators and their corresponding symbols in C are:

  1. Addition +
  2. Subtraction -
  3. Multiplication *
  4. Division /
  5. Modulus % 

When the / operator is used to participate in integer division the resulting integer
is obtained through discarding (or truncating) the fractional a part of the precise
floating point value. 

For illustration:
1/2=0
3/2=1


Increment & Decrement operators 

 

Increment operator ++ adds 1 to its operand 
Decrement operator __ subtracts 1 from its operand

it are two types 
  1. pre increment / Decrement 
  2. post increment / Decrement 


 

Any question about arithmetic increment & Decrement  operators writes down in comment box. Everyday check this blog u will learn lot things of C programming and Web application development 

No comments:

Post a Comment