What is the output of following code include void ConvHrMin

What is the output of following code? #include void ConvHrMin (int timeVal, int* hrVal, int* minVal) {*hrVal = timeVal/60; *minVal = timeVal % 60; return;} int main(void) {int totTime = 0; int usrHr = 0; int usrMin = 0; printf(\"Enter total minutes: \"); scanf(\"%d\", &totTime;); ConvHrMin(totTime, &usrHr;, &usrMin;); printf (\"Equals: %d hrs %d mins\ \", usrHr, usrMin); return 0;}

Solution

The program will display number of hours and minutes

for example if we enter 130 minutes it will display

Equals 2 hours 10 mins

ok getting it

we enter time in minutes but it will display in hours and minutes that\'s all

 What is the output of following code? #include void ConvHrMin (int timeVal, int* hrVal, int* minVal) {*hrVal = timeVal/60; *minVal = timeVal % 60; return;} int

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site