Item Value
Header filemath.h
Declarationfloat fabsf(float num);double fabs(double num);long double fabsl(long double num);
Returnreturns the absolute value of num.
#include
#include
int main(void)
{
printf("%1.1f %1.1f", fabs(1.0), fabs(-1.0));
return 0;
}
1.0 1.0