1.

Which function will return the quotient and remainder on division of numerator with denominator?(a) div()(b) div_t()(c) ldiv_t()(d) labs()I have been asked this question during an internship interview.My doubt is from General Utilities topic in chapter C Library of C

Answer»

Correct OPTION is (a) div()

To explain: div_t div(int num, int den);

The div () function is USED to COMPUTE the QUOTIENT and remainder of the division of the NUMERATOR num by the denominator den.div_t is the structure which contains a quotient member and a remainder member.



Discussion

No Comment Found

Related InterviewSolutions