1.

What members do the structure returned by function div() contains?(a) int quot and int rem(b) float quot and float rem(c) double quot and double rem(d) no members are returned by div()I got this question during an interview.My question is from General Utilities in portion C Library of C

Answer»

Correct option is (a) int quot and int rem

Easy explanation - A structure of type div_t is returned by the FUNCTION DIV(), contains both the QUOTIENT and the REMAINDER. The structurecontains two members,

 int quot; /* quotient */

int rem; /* remainder */



Discussion

No Comment Found

Related InterviewSolutions