C Introduction
Control Statement
- Program to find sum of digits
- Program to Reverse a String
- Reverse a String by swapping
- Program to check largest number
- Program to find factor of a number
- Program to find largest number among n numbers
- Program to print multiplication table
- An effective way to use of Else If
- Program to check vowel or not
Functions
Array
Pointers
Structure and Union
No Examples found for this topic - CodeHelpPro
Data Files
No Examples found for this topic - CodeHelpPro
Effective way to Find ASCII Value of character
In this program, we will learn to find ASCII value of character. To understand this knowledge, You must knowledge in following topics.
Algorithm
The algorithm of program to find ASCII value of any character is
Step 1: Start
Step 2: Initialize character variable as c
Step 3: Take character input and store it in c
Step 4: Print integer value of that character
Step 5: End
Flowchart
The flowchart of program to find ASCII value of any character is

Now we will look on code to find ASCII value of any character
CODE: Find ASCII value of character
Here is the code to find the ascii value of any character. Here we will use character and integer data types to print ASCII value of any character.
#include<stdio.h>
int main()
{
char c;
printf("Enter a character : ");
scanf("%c" , &c);
printf("\nASCII value of %c = %d",c,c);
return 0;
}
The output of above program is
Enter a character : A
ASCII value of A = 65
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments