ASCII Table in CThis topic will discuss the ASCII codes and how to write a program to print an ASCII table in the C programming language. ASCII stands for American Standard Code for Information Interchange. ASCII code is a character encoding scheme used to define the value of basic character elements for exchanging information in computers and other electronic devices. Furthermore, the ASCII code is a collection of 255 symbols in the character set, divided into two parts, the standard ASCII code, and the extended ASCII code. The standard ASCII code ranges from 0 to 127, 7 bits long, and the extended ASCII code from 128 to 255 is 8 bits long. These characters are a combination of symbol letters (uppercase and lowercase (a-z, AZ), digits (0-9), special characters (!, @, #, $, etc.), punctuation marks, and control characters. Hence, we can say, each character has its own ASCII value. For example, when we enter a string as "HELLO", the computer machine does not directly store the string we entered. Instead, the system stores the strings in their equivalent ASCII value, such as '7269767679'. The ASCII value of H is 72, E is 69, L is 76, and O is 79. Program to get the ASCII value of the capital lettersProgram.c Output The ASCII value of A is 65 The ASCII value of B is 66 The ASCII value of C is 67 The ASCII value of D is 68 The ASCII value of E is 69 The ASCII value of F is 70 The ASCII value of G is 71 The ASCII value of H is 72 The ASCII value of I is 73 The ASCII value of J is 74 The ASCII value of K is 75 The ASCII value of L is 76 The ASCII value of M is 77 The ASCII value of N is 78 The ASCII value of O is 79 The ASCII value of P is 80 The ASCII value of Q is 81 The ASCII value of R is 82 The ASCII value of S is 83 The ASCII value of T is 84 The ASCII value of U is 85 The ASCII value of V is 86 The ASCII value of W is 87 The ASCII value of X is 88 The ASCII value of Y is 89 The ASCII value of Z is 90 Program to get the ASCII value of the small lettersProgram2.c Output The ASCII value of a is 97 The ASCII value of b is 98 The ASCII value of c is 99 The ASCII value of d is 100 The ASCII value of e is 101 The ASCII value of f is 102 The ASCII value of g is 103 The ASCII value of h is 104 The ASCII value of i is 105 The ASCII value of j is 106 The ASCII value of k is 107 The ASCII value of l is 108 The ASCII value of m is 109 The ASCII value of n is 110 The ASCII value of o is 111 The ASCII value of p is 112 The ASCII value of q is 113 The ASCII value of r is 114 The ASCII value of s is 115 The ASCII value of t is 116 The ASCII value of u is 117 The ASCII value of v is 118 The ASCII value of w is 119 The ASCII value of x is 120 The ASCII value of y is 121 The ASCII value of z is 122 Program to get the ASCII value of the given charactersProgram3.c Output Enter the name to get the ASCII codes: JAVATPOINT The ASCII code of the character J is 74 The ASCII code of the character A is 65 The ASCII code of the character V is 86 The ASCII code of the character A is 65 The ASCII code of the character T is 84 The ASCII code of the character P is 80 The ASCII code of the character O is 79 The ASCII code of the character I is 73 The ASCII code of the character N is 78 The ASCII code of the character T is 84 Program to get the ASCII value of the special charactersProgram4.c Output The ASCII value of '!' special character is: 33 The ASCII value of '"' special character is: 34 The ASCII value of '#' special character is: 35 The ASCII value of '$' special character is: 36 The ASCII value of '%' special character is: 37 The ASCII value of '&' special character is: 38 The ASCII value of ''' special character is: 39 The ASCII value of '(' special character is: 40 The ASCII value of ')' special character is: 41 The ASCII value of '*' special character is: 42 The ASCII value of '+' special character is: 43 The ASCII value of ',' special character is: 44 The ASCII value of '-' special character is: 45 The ASCII value of '.' special character is: 46 The ASCII value of '/' special character is: 47 The ASCII value of ':' special character is: 58 The ASCII value of ';' special character is: 59 The ASCII value of '<' special character is: 60 The ASCII value of '=' special character is: 61 The ASCII value of '>' special character is: 62 The ASCII value of '?' special character is: 63 The ASCII value of '@' special character is: 64 The ASCII value of '{' special character is: 123 The ASCII value of '|' special character is: 124 The ASCII value of '}' special character is: 125 The ASCII value of '~' special character is: 126 Program to print the complete ASCII tables in CProgram6.c Output Next TopicStatic function in C |