Tuesday 24 June 2014

C++ program to print ASCII value of all alphanumeric characters


Here is a C++ program to print ASCII value of all alphanumeric characters


 SOURCE CODE OUTPUT
#include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
    unsigned char ch=1;
    cout<<"Character  :  ASCII Values"<<endl;
    for(int i=48;i<=57;i++)
         cout<<"    "<<char(i)<<"      :   "<<i<<endl;
    for(int i=65;i<=90;i++)
         cout<<"    "<<char(i)<<"      :   "<<i<<endl;
    for(int i=97;i<=122;i++)
         cout<<"    "<<char(i)<<"      :   "<<i<<endl;
    return 0;
}

Any questions regarding to program please write in comments.

No comments:

Post a Comment