Professional Documents
Culture Documents
Character
Every character in C programming is given an integer value to represent it. That integer value is
known as ASCII value of that character. For example: ASCII value of 'a' is 97. Here is the
complete list of ASCII value of characters in C programming . When a character is stored in
variable of type char , the ASCII value of character is stored instead of that character it self
character itself. For example: If you try to store character 'a' in a char type variable, ASCII value
of that character is stored which is 97.
In, this program user is asked to enter a character and this program will display the ASCII value
of that character.
Source Code
/* Source code to find ASCII value of a character entered by user */
#include <stdio.h>
int main(){
char c;
printf("Enter a character: ");
scanf("%c",&c);