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

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

Both functions are to retrieve absolute value. abs() is for integer values and fabs() is for floating type numbers. Prototype for abs() is under the library file < stdlib.h > and fabs() is under < math.h >.

Leave a Reply

Your email address will not be published.