Question: 3. Given the following code: a. What decimal value appears in y after executing the code? b. What decimal value appears in y after

3. Given the following code: a. What decimal value appears in y

 

3. Given the following code: a. What decimal value appears in y after executing the code? b. What decimal value appears in y after executing the code, if MyVar-15 just before executing the switch statement? #include #pragma config MCLRE=OFF,WDT=OFF,OSC-IRCIO67,LVP=OFF,PBADEN=OFF char x; char y; char My Var; void main(void) { x = 0x47; MyVar=x&0x0F; switch (MyVar) case 0b01000111: { y = x; break; } case OxOF: { y = x+2; } case 0b01000000: { y = x+5; break; } case 7: { y = x+10; break; } default: { y = 257; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a The decimal value that appears in y after executing the code is 71 Explanation In the ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!