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

Question 7 has typo first word is which 2nd instead of sued it\'s used. Thanks i

ID: 3686482 • Letter: Q

Question


Question 7 has typo first word is which 2nd instead of sued it's used.
Thanks in advance. 1. #include -rins.h" state Ledott; typedef struct task 5. nt state 6. nsigned long perlod 1 Transitions unsigned long elapsedrise 84, switch (state) case BL tedott 9, task; 10 11. task tasks [2) 13. const unsigned char taskssun-2: 4const unsigned long periodBlinkted 1500 15. const unsigned long perLodThreeteds 500 default: 9. // State action 94. return state 17, const unsigned long tasksPeriodGCD·500; 19 Int Tickfet 81inkted (int state) 20. int Tickfet Threeleds (int state): 2 unsigned char processingRdyTasks-0 23. void TinerIsRO 24 unsigned char ii 25 f (processingRdyTasks) t 26 99. int ticiret ThreeLeds (int state)- 100. state.' e.g..statie int x-0s printt"period too shore In revariables for state machine go here/ svitch(state) case - 20 processi if ( tasks(i.elapsedtine tasks[4]-period case L 0 taskst3) state- tasks[4] Tickret (tasksi).state): state n; tasks(11 elapsedTine 0 tasks|].elapsedtine +e tasksPeriodoCD, case TL 2 36. pEocessingRdytasks- state-2 115 116. 38. int mainO case TL 2 40, 41· 42. unsigned char i tasks [1].state--1i tasks [1]-period . periodBlinktedu state L TO taskst4) rickret sickfet Binkted 123. State-1 47. tasks 1.state "-1; 48 tasks [4]-period perlodthreeLedsa 9tasks141-elapsedtine-taskst41-period switch estate) case TL TO 53. TinerSet (tasksPeriodocD) 54 Timeron (O 131 case TL T 57 50 59 return case TL 2 1- enan BL States1 BL Ledott. BL Ledon1 BL State: 139 62. int TickFet_Blinktedint state) 63VARTABTES MUST BE DECLARED STATIC/ 64 e-g. static int x-0 5.*variables for state machine go here* 66 sitch (state) defeuit: state BL Ledotti 70 case t Ledoee 72 ase B Tedo it

Explanation / Answer

1)4-9 as it is a structure that encapsulates data into a single unit.

2 line8->it has a pointer which points to tick function.

3.line11-task task[] creates an array of tasks named tasks.

7. 22 as it will use unsigned variable whose alue is not sure and is decidable dependable on the condition.

8.17 it initioalizes gcd to the value 500

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