Examveda

What will be the output of the following C code?
void main() 
{ 
   div_t  res;  
   res = div(34, 4); 
   printf("quotient part = %d\n", res.quot); 
   printf("remainder part = %d\n", res.rem); 
}

A. quotient part=0
remainder part=4

B. quotient part=8
remainder part=2

C. quotient part=4
remainder part=0

D. quotient part=2
remainder part=8

Answer: Option B


This Question Belongs to C Program >> Standard Library Functions

Join The Discussion

Related Questions on Standard Library Functions