Effective way to Find ASCII Value of character

0 Suresh Chand June 2, 2021

In this program, we will learn to find ASCII value of character. To understand this knowledge, You must knowledge in following topics.

Download Application: Learn C Programming with Live Compiler

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

Flowchart : Effective way to Find ASCII Value of character

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;
}

Download Application: Learn C Programming with Live Compiler

The output of above program is

Enter a character : A

ASCII value of A = 65
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Join Our Newsletter Now

Get the latest tutorials, examples and projects updates.

Ads Block Detector Powered by codehelppro.com

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Disable Ad Block

Want Same System