Code Box
-----------------------------------------
/*program to print ASCII values of all Characters*/
/* We know the range of character is from -127 to 128 */
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
char ch;
clrscr();
printf("\n----CHARACTER VALUE OF ASCII-----\n");
for(i=1;i<=128;i++)
{
ch=i; //Integer to Character
printf("%d = %c | ",i,ch);
}
getch();
}
No comments:
Post a Comment