Design a program that prompts the user to enter a character first and then displays the ASCII value as well as the binary value of the character entered. The program also prompts the user to enter a specific bit of the character entered to be checked and displayed.
Requirements:
The following two user-defined functions are required:
1) void getBinary(char ch); /* Computes and displays the binary value of the character that is passed to the function. */
2) int getBit(char ch, int x);
/* Computes and returns the xth bit of the ch character that is passed to the function. */
It is required to submit a file that contains your source code, i.e. Lab3.c, and a file that contains
screen captures of your program's output before the deadline, i.e. the beginning of the Week 4
lab class.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |