Working of these mathematical functions: fabs(),floor(), fmod()

Q13. Describe the working of these mathematical functions:

  1. fabs()
  2. floor()
  3. fmod()

Ans.(1). fabs()

General form of fabs()

double  fabs (double num)

The fabs() function returns the absolute value of num.

Ans.(2). floor()

General form of floor()

double floor (double num)

The floor() function returns the largest integer (represented by double) not greater than num.

Ans.(3). fmod()

General form of fmod()

double fmod (double x, double y)

The fmod() function returns the remainder of the division x/y.

Leave a Reply

Your email address will not be published. Required fields are marked *

156 Views
%d bloggers like this: