trunc: returns the truncated value of arg : trunc « math.h « C / ANSI-C






trunc: returns the truncated value of arg


    

//Declaration: float truncf(float arg); 
               double trunc(double arg); 
               long double truncl(long double arg);  
 

  

  #include <math.h>
  #include <stdio.h>

  int main(void)
  {
    printf("%f\n", trunc (1.2));

    return 0;
  }

         
        /*1.000000*/ 

           
       








Related examples in the same category