Question: Please complete folowing in C language Name: Student ID: Section: [5 MARKS] B 0 Ow 7 8 9 Create a program that declares the following
Name: Student ID: Section: [5 MARKS] B 0 Ow 7 8 9 Create a program that declares the following two variables: - a character variable initialized to the letter 'A'. - an integer variable initialized to the integer e. Next the program should prompt the user to enter an uppercase or lowerca.. character from the keyboard. I The program should then print both the character AND the decimal ASCII value of the character entered from the keyboard. Note that the ASCII value of the character can be obtained by type casting the character variable to an integer. Refer to the sample run below: NOTE: The Name, Student ID and Section that appears in he output of the program should be your own, not the ones used in the sample run. Sample run 1: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Be 31 32 33 34 35 36 37 38 39 40 41 42, Name: Smith, Peter Student ID: 309999999 Section: ee1 Enter an uppercase or lowercase character: t (Note: t from the keyboard) ASCII value of character t is: 116 Press any key to continue... PROGRAM OUTPUT Provide TWO sample runs and paste it to your WORD document: For the FIRST sample run, input from the keyboard uppercase , For the SECOND sample run, input from the keyboard lowercase 9. E#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
