Question: Write a C program that prints the integer equivalents of some uppercase letters, lowercase letters, digits and special symbols. As a minimum, determine the integer equivalents of the following: A B C a b c 0 1 2 $ * + / and the blank character.
1 2 |
/* <br /> * Author: AGHATISE OSAZUWA<br /> * Website: www.cscprogrammingtutorials.com <br /> *<br /> * program that prints the integer equivalents of some uppercase letters,<br /> * lowercase letters, digits and special symbols.<br /> */<br /><br />#include <stdio.h><br />int main ( ){ <br /> printf("A = %dn", 'A');<br /> printf("B = %dn", 'B');<br /> printf("C = %dn", 'C');<br /> printf("D = %dn", 'D');<br /> printf("E = %dn", 'E');<br /> printf("a = %dn", 'a');<br /> printf("b = %dn", 'b');<br /> printf("c = %dn", 'c');<br /> printf("d = %dn", 'd');<br /> printf("e = %dn", 'e');<br /> printf("0 = %dn", '0');<br /> printf("1 = %dn", '1');<br /> printf("2 = %dn", '2');<br /> printf("3 = %dn", '3');<br /> printf("4 = %dn", '4');<br /> printf("5 = %dn", '5');<br /> printf("# = %dn", '#');<br /> printf("$ = %dn", '$');<br /> printf("@ = %dn", '@');<br /> printf("& = %dn", '&');<br /> printf("! = %dn", '!');<br /> printf("* = %dn", '*');<br /> printf("+ = %dn", '+');<br /> printf("/ = %dn", '/');<br /> printf("- = %dn", '-');<br /> printf("Blank character = %dn", ' ');<br /> return 0;<br />}<br /> |
Click here to see other solutions to Deitel C How To Program exercises.