C PROGRAMMING
C program to find out ASCII value of the character
ASCII stands for American Standard Code for Information Interchange, Today we will write the code, how we can find out ASCII value of the character.
History of ASCII
ASCII was first developed and published in 1963 by the X3 committee, a part of the ASA (American Standards Association). The ASCII standard was first published as ASA X3.4-1963, with ten revisions of the standard being published between 1967 & 1986.
Before going towards the code, first, we will get to know what is ASCII
ASCII is nothing but a code that represents 128 English characters as numbers, with each letter assigned a number from 0 to 127. Uppercase A has ASCII value 65 in decimal. So for Z, the value is 90 in decimal. Lowercase a has ASCII value 97 in decimal. So for z, the value is 122 in decimal.
Below image shows the ASCII code of English characters
We can find out ASCII value in c programming using below code
#include<stdio.h> //contains printf and scanf function
void main() // returns nothing
{
printf("\n\n\t\tCodehunger - Anyone can learn anything\n\n\n");
char c;
printf("Enter a character : ");
scanf("%c" , &c);
printf("\n\nASCII value of %c = %d",c,c);
printf("\n\n\t\t\tCoding is intresting !\n\n\n");
}