C++ Program to Find ASCII value of a character

#include<iostream.h>                
#include<conio.h>

void main()
{
clrscr();
char ch,c;
int cha;
cout<<“Enter a character:”;
cin>>ch;
cha=ch;
cout<<“nASCII value of “<<ch<<” is “<<cha;
c=ch+1; cha=c;
cout<<“nAdding one to the character:”<<“nASCII value of “<<c<<” is “<<cha;
getch();
}

8 thoughts on “C++ Program to Find ASCII value of a character”

Leave a Comment

Your email address will not be published. Required fields are marked *