Horje
Enter a key and display it's ascii value in c++ Code Example
c++ get ascii value of char
#include<iostream>
using namespace std;
int main ()
{
    char c;
    cout << "Enter a character : ";
    cin >> c;
    cout << "ASCII value of " << c <<" is :  " << (int)c;
    return 0;
}
Enter a key and display it's ascii value in c++
#include<iostream.h>
#include<conio.h>
void main()
{
  char a;
  clrscr();
  cout<<"\nEnter any key: ";
  cin>>a;
  cout<<"ASCII value of "<<a<<" is: "<<int(a);
  getch();
}




Cpp

Related
do while loop c++ loops continuously Code Example do while loop c++ loops continuously Code Example
include cpp Code Example include cpp Code Example
built in function in c++ for binary to decimal Code Example built in function in c++ for binary to decimal Code Example
check if a string is palindrome cpp Code Example check if a string is palindrome cpp Code Example
access first value in a set c++ Code Example access first value in a set c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10