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 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
a The decimal value that appears in y after executing the code is 71 Explanation In the ... View full answer
Get step-by-step solutions from verified subject matter experts
