C Program to Check whether an Alphabet is Vowel or Consonant
C Program to Find ASCII value of a Character:
ASCII value represents the English characters as numbers, each letter is assigned a number from 0 to 127. For example, the ASCII value for uppercase Q is 81.
Source Code:
#include
int main()
{
char ch;
printf("Enter any character:");
/* Reads the entered character and stores it
* into the char variable ch
*/
scanf("%c", &ch);
/* Using the format specifiers we can get the ASCII code
* of a character. When we use %d format specifier for a
* char variable then it displays the ASCII value of a char
*/
printf("ASCII value of character %c is: %d", ch, ch);
return 0;
}
Output:
Enter any character:Q
ASCII value of character Q is: 8.... Show More
All Chapters — C programming
Similar Questions
From C programs on various integers · C programming
C Program to check Leap Year:
C Program to Reverse a Number & Check if it is a Palindrome:
C Program to Check whether a given Number is Armstrong:
C Program to Find Multiplication of two Binary Numbers:
C Program to Print Armstrong Number from 1 to 1000
C Program to Check whether a given Number is Perfect Number:
C Program to Find the Sum of two Binary Numbers: