C++ Program to display the ASCII value of given character [DEVCPP/GCC]

ASCII CODE

ASCII stands for American Standard Code for Information Interchange. Computers can only understand binary numbers, so an ASCII code is the numerical representation of a character.

//Program to display the ASCII value of given character

#include <iostream>

using namespace std;

int main()
{
int num;
char ch;

cout<<"ENTER CHARACTER: ";
cin>>ch;

  num = (int) ch;     //Type Casting

cout<<"ASCII VALUE OF "<<ch<<" IS "<<num;
return 0;
}


Share this

Related Posts

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer

FIND US ON FACEBOOK!