Code Box
--------------------------------------------
/*program to convert Character value into ASCII value */
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
char ch;
clrscr();
printf("\n----CHARACTER TO ASCII-----");
printf("\nEnter a Character:");
scanf("%c",&ch);
i=ch;
printf("\nASCII vallue of Character %c is %d ",ch,i);
getch();
}
No comments:
Post a Comment