Posted in Blog, C++, Training Courses
Education, Tools and Services
#include <iostream>
using namespace std;
int main()
{
//variable declaration
char asciichar;
//take user input
cout << "Enter a character : ";
cin >> asciichar;
//display ascii value of character
cout << "\nIt's ascii value is : " << (int) asciichar << endl;
return 0;
}
_______________________________OUPUT______________________________
Enter a character : a
It's ascii value is : 97
Copyright © 2021 - - - - - - Designed By: Softnic WebSolutions