Wednesday, February 11, 2015

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<<"
ASCII value of "<<ch<<" is "<<cha;
c=ch+1; cha=c;
cout<<"
Adding one to the character:"<<"
ASCII value of "<<c<<" is "<<cha;
getch();
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.