If both operands i1 and i2 are integers, the expression i1/i2 provides integer division : int Calculation « Data Type « C Tutorial






#include<stdio.h>

main( )
{
  int a = 1,b =2;

  printf("\n a = %f",a/b);
  printf("\n a = %d",a/b);
}
a = 0.000000
 a = 0








2.5.int Calculation
2.5.1.Simple calculations
2.5.2.Divide Integer
2.5.3.Sum the integers from 1 to a user-specified number
2.5.4.If both operands i1 and i2 are integers, the expression i1/i2 provides integer division