Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you please make sure there is two columns for the tables. Half of the values would go on the left and the other half
Can you please make sure there is two columns for the tables. Half of the values would go on the left and the other half on the right
Introduction Your first assignment will consist of two small C programs that mostly involve basic iteration logic Please note that your programs should comply with the commenting and formatting rules as described in class and in the formatting file on eLearning. For example, there should be a header for the whole program that gives the author's name, class name, date, and description. End braces should be commented, and there are alignment and indenting requirements as discussed. A file on eLearning describes these requirements. Please ask if you have any questions Program #1: Creation of an ASCII Table Write a C program that implements that ASCII table given on Slide 30 of the first slide set. That ASCII table will be reproduced below for reference Your program should first print out the column headings. It should then print out the binary, octal, decimal, hexadecimal, and character versions of the ASCII characters from 32 to 126 (decimal), as indicated in the table. Two vertical columns should be sufficient Oct Dec 32 Char Oct Dec Char Hex Hex Note that the columns should run top to bottom (instead of left to right). The range between 32 and 126 has an odd number of entries. Therefore, the left hand column will have one more entry than the right hand column. As we will see shortly, the decimal, octal, and hexadecimal versions of these numbers can be easily displayed using the built-in conversion codes ofprintf(). The binary versions, however, are more difficult. Two algorithms for converting a decimal number to binary are (1) repeatedly divide the decimal number and its quotients by 2 and collect the remainders (the last remainder collected will be the most significant digit of the result), (2) create the hexadecimal equivalent of the original decimal number and use that hexadecimal intermediate to create the binary. The latter technique depends on the fact that the 16 hexadecimal digits (ranging from 0 to F) exactly correspond to the 16 numbers that can be created out of four bits (ranging fromStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started