Find ASCII Value of a Character in C++

 In this example, You learn about C++ program for find ASCII value of a character. 


Here you learn find ASCII value in C++, You are given a character and the task of the program to find ASCII value of a character.

C++ Program to find ASCII value of a Character

#include <iostream>
using namespace std;
int main() {
 char ch,c;
 int cha;
 cout<<"Enter a character: ";
 cin>>ch;
 cha=ch;
 cout<<"\n ASCII value of "<<ch<<" is "<<cha;
 return 0;
}
Output

Enter a character: F
 ASCII value of F is 70

If you have any doubts, Please let me know

Previous Post Next Post

Contact Form