labs c++ In C++labs c++ In C++

labs c++ In C++, the labs() function is used to compute the absolute value of a long integer. It is defined in the <cstdlib> header.

Syntax:
cpp
Copy
Edit
#include <cstdlib>
long labs(long num);
Parameters:
num → A long integer whose absolute value is to be computed.
Returns:
The absolute value of num.