Showing posts with label Ascii Values. Show all posts
Showing posts with label Ascii Values. Show all posts

Sunday, 20 July 2014

How to find ASCII Values of Alphabets

Structure of the Problem Requirements  

A simple program for beginners to display ASCII Values of English Alphabets. You can extend this program to show all ASCII values and their corresponding characters by modifying for loop for(i=0;i<=255;i++) 
and removing if and continue statements from line no 9 and 10 respectively.

Source Code



#include<stdio.h>
int main()
{
int i;
printf("\n\n ***************** ASCII VALUES ****************** \n\n\n");

for(i=65;i<=122;i++)
{
if (i >=91 && i <= 96) //to non non alphabet characters
continue;
printf("%d - %c",i,i);

printf("\n");
}

return 0;

}

Output of the Program


ASCII values
ASCII Values