5 years ago in C Basic Concepts

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.
Loading...
Next Question

Overall Stats

Attempted 223
Correct 36
Incorrect 91
Viewed 96

Answers

Guest
Guest
Deep
Deep - 1 month ago

Deep from Kolkata, India is saying rem = modf(3.14, 2.1); is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying rem = fmod(3.14, 2.1); is correct answer

Sidharth kashyap
Sidharth kashyap - 6 months ago

Sidharth kashyap from Patna, India is saying rem = fmod(3.14, 2.1); is correct answer

R.K YouTube channel
R.K YouTube channel - 8 months ago

R.K YouTube channel from Bhubaneswar, India is saying rem = fmod(3.14, 2.1); is correct answer

Rajeswari Raji
Rajeswari Raji - 8 months ago

Rajeswari Raji from Hyderabad, India is saying rem = modf(3.14, 2.1); is correct answer

Related Questions

In the following program where is the variable a getting defined and where it is getting declared? #include int main() { extern int a; printf("%d\n", a); return 0; } int a=20;

  • [A] extern int a is declaration, int a = 20 is the definition
  • [B] int a = 20 is declaration, extern int a is the definition
  • [C] int a = 20 is definition, a is not defined
  • [D] a is declared, a is not defined

Is there any difference between following declarations? 1 : extern int fun(); 2 : int fun();

  • [A] Both are identical
  • [B] No difference, except extern int fun(); is probably in another file
  • [C] int fun(); is overrided with extern int fun();
  • [D] None of these

How would you round off a value from 1.66 to 2.0?

  • [A] ceil(1.66)
  • [B] floor(1.66)
  • [C] roundup(1.66)
  • [D] roundto(1.66)