Program to accept any character and print its ascii code.

          This is a program to accept any character and print its ascii code.





lets start....

//start
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
char ch;
int ascii;
cout<<"Enter any character";
cin>>ch;
ascii=ch;
cout<<"ASCII code for character is: "<<ascii;
getch();
}
//end


Press          Alt+F9   to compile program.
Then Press Ctrl+F9  to run program.

If you need help ,comment below.

please share this blog to your friends

Subscribe us for Future posts (My C Plus Plus)
Thank you

About Author:

Hey Cyber Astronauts, Welcome to the one of best blog The CyberSpace HUB. I'm Himanshu Singh, a Part-time-blogger from India. Here at The CyberSpace HUB I write about Starting and managing a blog,Latest technology and Making Money online.


Join Me: Twitter | Facebook | Google Plus


EmoticonEmoticon