Write a C++ Program For Find ASCII Value of a Character

Ram Pothuraju
#include <iostream>

using namespace std;

int main(){
 char ascii;
 cout << "Enter a character: ";
 cin >> ascii;
 cout << "Its ascii value is: " << (int) ascii << endl;
 return 0;
}


Output

Enter a character: G
Its ascii value is: 71

Post a Comment

0Comments

Post a Comment (0)