C floor()

C floor() Prototype

double floor(double arg)

The floor() function takes a single argument and returns adouble type value.

It is defined in <math.h> header file.


For Example:

If 2.3 is passed to floor(), it will return 2.

The function prototypes for the long double and float versions of the floor() function are:

long double floorl(long double arg);
float floorf(float arg);

Example: C floor() Function

Output

Floor integer of -8.33 = -9