labs : labs « stdlib.h « C Tutorial






ItemValue
Header filestdlib.h
Declarationlong int labs(long int num);
Functionreturns the absolute value of num.


Convert the number entered at the keyboard into its absolute value.

#include <stdlib.h>
  #include <stdio.h>

  int main(void){


    printf("%d", labs(-11111));
  }
11111








23.15.labs
23.15.1.labs