program:
#include< iostream>
using namespace std;
int main()
{
char ch;
cout<<"Enter any charn";
cin>>ch;
cout<<"ASCII value of this is: "<< int(ch);
return 0;
}
Enter any char
G
ASCII value of this is: 71
Enter any char
A
ASCII value of this is: 65