CPP
using namespace std;
int main()
{
char c;
cout << "Enter a character: ";
cin >> c;
cout << "ASCII Value of " << c << " is " << int(c)<<"\n";
return 0;
}
Find ASCII Value of Character in C++
22 May
0
Write a program (WAP) in CPP to read two numbers from keyboard(User Input) to find ASCII value of a character.
#include <iostream>using namespace std;
int main()
{
char c;
cout << "Enter a character: ";
cin >> c;
cout << "ASCII Value of " << c << " is " << int(c)<<"\n";
return 0;
}
Also Read :-
Programs of C
Programs of C++
Programs of Java
Programs of Python
Codes with HTML, CSS, JS
More Questions & Answers
Previous article
Next article
Leave Comments
Post a Comment