Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Practice InterviewNew Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Language in C Interview Questions and Answers

Ques. Can we get the remainder of a floating point division ?

Ans. Yes. Although the % operator fails to work on float numbers we can still get the remainder of floating point division by using a function fmod( ). The fmod( ) function divides the two float numbers passed to it as parameters and returns the remainder as a floating-point value. Following program shows fmod( ) function at work.

#include <math.h>

main( )
{
printf ( "%f", fmod ( 5.15, 3.0 ) ) ;
}

The above code snippet would give the output as 2.150000.
Is it helpful? Yes No

Most helpful rated by users:

©2020 WithoutBook