Declarations and Initializations

Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?

a. rem = 3.14 % 2.1;
b. rem = modf(3.14, 2.1);
c. rem = fmod(3.14, 2.1); 
d. Remainder cannot be obtain in floating point division.


Prev1 of 6

Share This Post