Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Thursday 4 April 2019

Fmod Function

FMOD Function:

In the C Programming Language, the fmod function returns the remainder when x is divided by y.

Syntax

The syntax for the fmod function in the C Language is:
double fmod(double x, double y);
x is divided by y.

Returns

The fmod function returns the remainder when x is divided by y.

Required Header

In the C Language, the required header for the fmod function is:
#include <math.h>

C program:

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

int main ()
{
printf ("fmod of 3.14/2.1 is %lf\n", fmod (3.14,2.1) );
  return 0;
}


0 comments:

Post a Comment