Introduction
Control Statement
- Program to the sum of natural numbers
- Program to check leap year
- Program to find factorial of the number
- Program to find reverse of the number
- Program to Check Armstrong Number
- Program to find the sum of Natural Numbers using Recursion
- Calculator Program
- Program to identify day of week
- Program to print Fibonacci series
Function
- Program to convert Binary to Octal Number
- Program to convert Octal to Binary Number
- Program to find reverse of the sentence using Recursion
- Program to Shutdown and restart Computer
- Program to find the area of triangle
- Program to find LCM
- Program to check prime number using Functions
- Program to convert Binary to Decimal Number
- Program to convert Decimal to Binary Number
Array
Pointer
OOPS
No Examples found for this topic - CodeHelpPro
Program to find ASCII value of a character
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.
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments