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.

computer science

Description

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. 


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.