Question: 1. (4 marks) Modify the following code so the received character is converted into uppercase If necessary. char Selection: Selection = getch(); 2. (3 marks)

1. (4 marks) Modify the following code so the received character is converted into uppercase If necessary. char Selection: Selection = getch(); 2. (3 marks) Indicate 3 limitations of the switch. 3. (3 marks) For each of the following loops: a. What is their purpose? b. Why are they popular for embedded programming c. Which one is the best? Loop 1: for(:) frest of your code.... Loop: while(1) //rest of your code... Loop 3: frest of your code... twntle(); 4. (3 marks) When you create your own header files, what Information do you place into them currently? 5. (2 marks) What is wrong with the following code snippet? unsigned char a -128, b - 170, C-3+b; 6. (3 marks) Convert the following defines into an enum: #define Mazda 1 #define Ford 2 #define Fiat 3 #define Porshe 4 #define Land_Rover 5 7. (2 marks) The following 2 styles of main may be used the first one is one that you have been typically been using and he second one tends to be used more for embedded systems. Why is the second one more popular for embedded systems? Style 1: Style 2: Int main(vold) void main(vold) Ilyour code... //your code.... return 0; 8. (2 marks) What hexadecimal mask should be used to turn off on bit #5 in an 8-bit microprocesser register without affecting any of the other bits in the register, and which bl-wise operator should be used? Bit 7 Bit 6 Bit 5 B1:4 Bit 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
