abs c++

The abs function in C++ returns the absolute value of a given integer. It takes an integer as its argument and returns the absolute value of that integer. The absolute value of a number is its distance from 0 on the number line. If the number is positive or zero, the absolute value is the number itself. If the number is negative, the absolute value is the negation of the number, i.e., its positive counterpart. The abs function is defined in the header file in C++.