Write a C program that builds the ASCII table, which is
reproduced below for reference. Print three sets of columns as
shown in the table. Your program should first print out the column
headings. It should then print out the octal, decimal, hexadecimal
and character versions of the ASCII characters from 32 to 126
(decimal), as indicated in the table. You do not need to print the
binary version. Use a loop and an integer variable(s) when
generating the table. Note that the columns in an ASCII table
typically run vertically and not horizontally.
Grading Rubric Turning in a program that does not print the
ASCII table, -100 points
Turning in a program that does not have 3 columns, -40
points
Turning in a program that does not have the third column correct
(no listing in the last row), -10 points
Turning in a program without the header comments, -10 points
Turning in a program without the header print, -10 points
Turning in a program without judiciously selected comments
sprinkled throughout, -10 points
Tony SparkEnlightened
Note: Could you plz go this code and let me know if u


need any changes in this.Thank You
_________________
#include <stdio.h>
//Function Declarations
void decToBinary(int i);
void decToOctal(int i);
void decToHex(int i);
int main()
{
//Declaring variables
int i;
printf(“Binary Oct Dec Hex Glyph “);
printf(“—— — — — —– “);
for(i=32;i<=126;i++)
{
//calling the functions
decToBinary(i);
decToOctal(i);
printf(“%d “,i);
decToHex(i);
printf(“%c”,i);
printf(” “);
}
return 0;
}
//This function will convert decimal to binary
void decToBinary(int n)
{
int j;
// array to store binary number
int binNum[1000] = {};
// counter for binary array
int i = 0;
while (n > 0) {
// storing remainder in binary array
binNum[i] = n % 2;
n = n / 2;
i++;
}
// printing binary array in reverse order
int bit = 8;
if ( i > 8 )
bit = 8*((i + 7)/8);
for (j = bit-1; j >= 0; j–)
printf(“%d”,binNum[j]);
printf(” “);
}
void decToOctal(int n)
{
int j;
// Declaring array to store octal number
int octalNum[100];
// counter for octal number array
int i = 0;
while (n != 0) {
// storing remainder in octal array
octalNum[i] = n % 8;
n = n / 8;
i++;
}
// printing octal number array in reverse order
for (j = i – 1; j >= 0; j–)
printf(“%d”,octalNum[j]);
printf(” “);
}
void decToHex(int n)
{
// char array to store hexadecimal number
char hexaDeciNum[100];
// counter for hexadecimal number array
int i = 0,j;
while(n!=0)
{
int temp = 0;
temp = n % 16;
if(temp < 10)
{
hexaDeciNum[i] = temp + 48;
i++;
}
else
{
hexaDeciNum[i] = temp + 55;
i++;
}
n = n/16;
}
// printing hexadecimal number array in reverse order
for(j=i-1; j>=0; j–)
printf(“%c”,hexaDeciNum[j]);
printf(” “);
}
_______________________
Output:
_______________Could you plz rate me well.Thank
You
CProgram Files (x86)Dev-CppMinGW64 binlDecimalToBinaryOctalHexadecimal.exe Binary Dec Hex Glyph 40 00100000 00100001 00100010 00100011 00100100 00100101 00100110 00100111 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 00110000 00110001 00110010 00110011 00110100 00110101 00110110 00110111 00111000 00111001 00111010 00111011 00111100 00111101 47 40 47 70 40 01000000 01000001 01000010 01000011 01000100 01000101 01000110 01000111 01001000 01001001 01001010 01001011 01001100 01001101 01001110 01001111 01010000 01010001 01010010 01010011 01010100 01010101 01010110 100 101 102 103 104 105 106 107 110 70 47 112 113 114 115 116 4B 4C 4D 4E 4F 120 121 122 123 124 125 126 80 C:Program Files (x86)Dev-CppMinGVV64ibinDecimalToBinaryOctalHexadecimal.exe 01010111 01011000 01011001 01011010 01011011 01011100 01011101 01011110 01100000 01100001 01100010 01100011 01100100 01100101 01100110 01100111 01101000 01101001 01101010 01101011 01101100 01101101 01101110 01101111 01110000 01110001 01110010 01110011 01110100 01110101 01110110 01110111 01111000 01111001 01111010 01111011 127 130 131 132 133 134 135 136 137 140 141 142 143 144 145 146 147 150 151 152 153 154 155 156 157 160 161 162 163 164 165 166 167 170 100 101 102 103 104 105 106 107 108 109 0 172 173 174 175 176 120 121 122 123 124 125 126 Process exited after 0.485 seconds with return value Press any key to continue .. .