Ceiling Function

  • It returns the smallest integer (represented as a floating-point value) not less than num.
  • On a number line , this means the right integer value for the given number .

  • Syntax:

    float ceilf(float num);
    double ceil(double num);
    long double ceill(long double num);


    #include <math.h>
    #include <stdio.h>
      int main()
        printf("%f", ceil(12.4));
        printf("%f", ceil(-10.9));
        printf("%f", ceil(0.9));
        printf("%f", ceil(-1.9));
     return 0;