MCQ Answer

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

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

3.14 को 2.1 से विभाजित करने के बाद शेष प्राप्त करने के लिए निम्नलिखित में से किस कथन का उपयोग किया जाना चाहिए?
Topic : Introduction

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. शेष बिंदु फ्लोटिंग पॉइंट डिवीजन में प्राप्त नहीं किया जा सकता है।




Correct Answer is :

C. rem = fmod(3.14, 2.1);



Explanation
fmod(x,y) - Calculates x modulo y, the remainder of x/y. This function is the same as the modulus operator. But fmod() performs floating point divisions.
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz