Created
November 8, 2015 18:06
-
-
Save nalin-adh/c80502bc9ce93e9acb71 to your computer and use it in GitHub Desktop.
A C++ program that reads a character and print its integer equivalent.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<conio.h> | |
using namespace std; | |
int main() | |
{ | |
char a; | |
cout<<"Enter any character : "; | |
cin>>a; | |
cout<<endl<<endl; | |
cout<<"The equivalent integer value of "<<a<<" is "<<static_cast<int>(a)<<endl; | |
getch(); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment