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
padovan string c++ program

I need to implement a mini version of linux''s ''tar'' function in C.

void main() { int *p, *q, i ; p=(int*)100; q=(int*)200; i=q-p; printf("%d",i); } }

HOW TO USE POINTER

Requirements: 1.  This assignment as well as other assignments in this class must be finished on Windows operating system. 2.  Zip your program and submit the zip file on ANG

Consider the following example: int max(int x, int y)                  {                                 return ( x > y) ? x : y ;                  }   float max

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

My project is compiling but the equation entered is not working

I need to include files so you can understand easier.

Write a program which incorporates a function named compute and which is used to calculate the area and circumference of a circle. Use the main function for inputs and outputs.