## C ceil() function

Posted on: May 9, 2018, by :

math.h header file supports ceil( ) function in C language. Syntax for ceil( ) function in C is given below.

This function is used to calculate tangent.

This function truncates the decimal value from floating point value and returns integer value.

This function is used to calculate hyperbolic cosine.

This function returns nearest integer value which is greater than or equal to the argument passed to this function.

This function returns the nearest integer value of the float/double/long double argument passed to this function. If decimal value is from .1 to .5, it returns integer value less than the argument. If decimal value is from .6 to .9, it returns the integer value greater than the argument.

ceil( ) function in C returns nearest integer value which is greater than or equal to the argument passed to this function.

math.h and stdlib.h header files support all the arithmetic functions in C language. All the arithmetic functions used in C language are given below.

This function is used to calculate hyperbolic sine.

This function is used to calculates base 10 logarithm.

include stdio.h include math.h int main() float i=5.4, j=5.6; printf(ceil of %f is %f\n, i, ceil(i)); printf(ceil of %f is %f\n, j, ceil(j)); return 0;

This function is used to calculate the exponential e to the x

This function is used to calculate sine value.

Other inbuilt arithmetic functions in C:

This function returns the nearest integer which is less than or equal to the argument passed to this function.

This function is used to calculate hyperbolic tangent.

Click on each function name below for detail description and example programs.

This is used to find the power of the given number.

This function is used to find square root of the argument passed to this function.

This function is used to calculate cosine.

Education, Teaching Training jobs

This function returns the absolute value of an integer. The absolute value of a number is always positive. Only integer values are supported in C.

This function is used to calculates natural logarithm.