๐Ÿ’ปap computer science a review

Abs(int a)

Written by the Fiveable Content Team โ€ข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโ€ขWritten by the Fiveable Content Team โ€ข Last updated September 2025

Definition

The abs() function is used to find and return the absolute value (magnitude) of an integer. It disregards any negative sign attached to it and always gives back its positive equivalent.

"Abs(int a)" also found in: