Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A device is connected to a computer that can return various temperatures related

ID: 3827241 • Letter: A

Question

A device is connected to a computer that can return various temperatures related to the weather. The GetTemps function returns the daily high temperature in bits 20-29, the daily low temperature in bits 10-19, and the current temperature in bits 0-9, all as 10-bit integers. In the following program fragment, lines 6 and 7 are incomplete. They should store the high temperature in highTemp and the current temperature in currTemp, so that these temperatures can be printed in line 10, Please complete lines 6 and 7. Show your work. # include int GetTemps(void); int main () {int w, highTemp, currTemp; w = GetTemps (); highTemp = currTemp = printf(" High: % d nCurrent: % d n ", highTemp, currTemp); return 0;}

Explanation / Answer

Please let me know in case of any issue.

So, we have to take input for :
   highTemp and currTemp

In given program , GetTemps() function is used to take temperature

So,

Line 6: highTemp = GetTemps();
Line 7 : currTemp = GetTemps();

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote