Program to show the ascii value of characters, C/C++ Programming

Program to show the ascii value of characters:

int main()

{

                int one_char;

                cout << "\nEnter a character: ";

                one_char = getch();

                cout << "\nThe character you entered was "

             << (char) one_char << '\n';

                cout << " Its ASCII value is "<< (int) one_char << '\n';

 

                return 0;

}

 

Posted Date: 10/18/2012 7:58:36 AM | Location : United States







Related Discussions:- Program to show the ascii value of characters, Assignment Help, Ask Question on Program to show the ascii value of characters, Get Answer, Expert's Help, Program to show the ascii value of characters Discussions

Write discussion on Program to show the ascii value of characters
Your posts are moderated
Related Questions

to find prime numbers upto any number say "n" entered by user

Sorted directory - C++ program: Write a program in c to sorting a directory. int main( int argc, char *argv[] ) {     if( argc 3 )         {         cerr

3. Write a program to encrypt and decrypt strings of characters using the following ciphers: a) Caesar cipher b) Vigenere cipher c) Matrix transposition cipher Your program shoul

write a C program that can display the transpose form of a ciphertext matrix.

Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and 6:

Question 1: (a) Describe the following objects and condition states: (i) ifstream and ofstream objects (ii) eof(), fail(), bad() and good() functions. (b) Write a C++ pr

Variables Information stored in a variable can alter in the course of the program. The type used in the definition explains the kind of information the symbol can store. Variab

In this sub-task will you implement three functions for the final three function prototypes that will do exactly the same as the three functions that you have just written. This ti