Program to find ASCII value of a character

0 Suresh Chand March 28, 2021

In this example, We will learn how to find ASCII value of a character.

ASCC stands for American Standard Code for Information Inter-exchange. This is the standard set that is assigned to characters and numbers that is understood by computer.

In this example, We will find out the ASCII value using the C++ programming language.

#include <iostream>
using namespace std;

int main()
    char c;

    cout << "Enter a character: ";
    cin >> c;

    cout << "ASCII Value of " << c << " is " << int(c);

    return 0;

The output of above program is

Enter a character: A
ASCII Value of A is 97

We can simply find ASCII value of any character by printing the integer value of any character.

Notify of
Inline Feedbacks
View all comments

Join Our Newsletter Now

Get the latest tutorials, examples and projects updates.



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