+ 1

What is the difference between abs() and fabs() functions?

What is the difference between abs() and fabs() functions in C programming language.

10th Nov 2018, 4:20 PM
Rahul Kumar👑🆕️
Rahul Kumar👑🆕️ - avatar
1 Odpowiedź
+ 4
Prototype: int abs(int n); Computes the absolute value of an integer number `n`. Prototype: double fabs(double n); Computes the absolute value of a floating point number `n`. fabs has defined in <math.h> abs has defined in <stdlib.h> ____ https://en.cppreference.com/w/c/numeric/math/abs https://en.cppreference.com/w/c/numeric/math/fabs
10th Nov 2018, 5:30 PM
Babak
Babak - avatar