1#include<iostream>
2using namespace std;
3int main ()
4{
5 char c;
6 cout << "Enter a character : ";
7 cin >> c;
8 cout << "ASCII value of " << c <<" is : " << (int)c;
9 return 0;
10}
1#include <iostream>
2using namespace std;
3
4int main() {
5 char c;
6 cout << "Enter a character: ";
7 cin >> c;
8 cout << "ASCII Value of " << c << " is " << int(c);
9 return 0;
10}