Table of Contents
In this tutorial, we will discuss the arithmetic function in C programming language
abs(): This function returns the absolute value of only an integer.The absolute value of a number is always positive. abs() maths function supports only integer value in C language. It does not support any datatype – float(fabs), double . This function includes #include<stdlib.h> header file.
Syntex
int abs(int value);
floor(): This functions opposite of th ceil function. It returns the nearest integer value which is less than or equal to the passing argument of this function(rounds dawns the nearest integer). This function includes #include<math.h> header file
Syntex
double floor(double value);
ceil() : This function is oposite of the floor function. It returns nearest and smallest integer value that is greater than or equal(not less than) to the passing argument of this function. This function includs #include<math.h> header file
Syntex
double ceil(double value);
round() :This function returns the nearest integer value of the float or double or lond ,double passing the argument to the function.This function include #include<math.h> header file
Syntex
double round(double value);
sin() : This function is used to calculate sine value.This function includes #include<math.h> header file
Syntex
double sin(double value);
cos() : Thid function is used to calculate cosine value.This function includes #include<math.h> header file
Syntex
double cos(double value);
cosh() : Thid function is use to calculate hyperbolic cosine value.This function includes #include<math.h> header file
Syntex
double cosh(double value);
exp() : This function is use to calculate the exponential “e” to the nth power.This function includes #include<math.h> header file
Syntex
double exp(double value);
tan() : This function is use tocalculate tangent.This function includes #include<math.h> header file
Syntex
double tan(double value);
tanh() : This function is used to perform hyperbolic tangent. This function includes #include<math.h> header file
Syntex
double tanh(double value);
sinh() : This function is used to calculate tangent. This function includes #include<math.h> header file
Syntex
double sinh(double value);
log(): This function is used to calculate natural logarithum. This function include s#include<math.h> header file
Syntex
double log(double value);
log10() : This function is used to calculate base 10 logarithum. This function includes #include<math.h> header file
Syntex
double log10(double value);
sqrt() : This function is used to find the sqaure root of the argument passed to this function. This function includs #include<math.h> header file. This function includes #include<math.h> header file
Syntex
double sqrt(double value);
pow() : This is used to find the power of the given number. This function includes in #include<math.h> header file
Syntex
double pow(double value1, double value2);
trunc() : This function truncates the decimal value from floating point value and returns an integer value.. This function includes #include<math.h> header file
Syntex
trunc(number,[decimal_places]);
String function in C language with example
Subtract two numbers using method overriding Program 1
PHP Star triangle Pattern program Here's a simple Java program that demonstrates how to print…
Using Function or Method to Write to temperature conversion: Fahrenheit into Celsius In this article,…
Function or method of temperature conversion from Fahrenheit into Celsius In this article, we will…
Write temperature conversion program: from Fahrenheit to Celsius In this article, we will discuss the…
How to write a program to convert Fahrenheit into Celsius In this article, we will…
This website uses cookies.