TCS
Company
Programming
Which of the fplowing statements should be used to obtain a remainder after
dividing 3.14 by 2.1?
1.rem = 3.14 % 2.1;
2.rem = modf(3.14, 2.1);
3.rem = fmod(3.14, 2.1);
4.Remainder cannot be obtain in floating point division.
Read Solution (Total 3)
-
- #include
#include
int main ()
{
printf ("fmod of 3.14/2.1 is %lfn", fmod (3.14,2.1) );
return 0;
}
Output:
fmod of 3.14/2.1 is 1.040000 - 6 years agoHelpfull: Yes(6) No(0)
- Option c food function should be used
- 6 years agoHelpfull: Yes(1) No(0)
- remainder cannot be obtain in floating point division
- 6 years agoHelpfull: Yes(0) No(1)
TCS Other Question