Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does abs () mean in C language?
What does abs () mean in C language?
Abs () is a function in C language, which takes the absolute value of integer data.

Specific usage can refer to the following examples:

int? a=-5,? b;

b? =? ABS(a);

printf("%d\n ",b); ? //? The output result is 5. Note: The parameter value of this function must be of type int. If it is not an int type, use fabs () function (this function takes the absolute value of float type data).