WAP To Display ASCII Code Of A Character.

#include<iostream.h>
#include<conio.h>
Void main()
{   clrscr();
     char ch=’A’;
     Int num=ch;
     cout<<”The ASCII code for”<<ch<<”is”<<num<<”\n”;
     cout<<”Adding 1 to the character code\n ”;
     ch=ch+1;
     num=ch;
     cout<<”TheASCII code for”<<ch<<”is”<<num<<”\n”;
     getch();

  }

Comments

Popular Posts