Quantcast
Channel: Codeamy: Learn Programming
Viewing all articles
Browse latest Browse all 25

Find ASCII Value of a Character in C++

$
0
0

 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

Viewing all articles
Browse latest Browse all 25

Latest Images

Trending Articles



Latest Images