A simple program for beginners to display ASCII Values of 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
Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of
BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
0 comments:
Post a Comment