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

Trainee Asked on November 4, 2019 in C Language.
Add Comment
1 Answer(s)

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 >.

Reviewer Answered on November 4, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.