In this program we will print ASCII value of alphabet entered by user. For this purpose we will declare a char variable and then we will ask user for entering its value. After this we will convert that character to integer using (int) char_variable.
Program:
// Program By http://solutionscpp.blogspot.com// Author Mansoor Ahmed
// GMail ID: secguy000@gmail.com
#include<iostream>
using namespace std;
int main()
{
char c;
cout<<"Enter Any Alphabet: ";
cin>>c;
cout<<"ASCII code of this Aplhabet is: " <<(int) c;
}
I found nice article in your blog.thank you for useful info
ReplyDelete.