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
Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

answer for tcs is working question

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

A: Use p = new T[n] and delete[] p:   Fred* p = new Fred[100]; ... delete[] p; Any time you allocate an array of objects through new (generally with the [n] in the n

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

what is the purpose of pointer ? what is the syntax? how it works?

Function fact explain how the process of recursion works in C++.In your answer assume that the function is called to calculate the factorial of 6?

(a) Write a procedure (count-even n) that counts the number of even digits in the decimal representation of the number n. For example, (count-even 234) should return 2. (b) Writ

What are the various types of control structures in programming? - Primarily there are 3 types of control structures in programming: Sequence, Selection and Repetition. - Se