C program to find Ascii value of input character or symbol

Ascii stands for American Standard Code for Information Interchange.Every character or symbol have its own Ascii value

#include<stdio.h>
#include<conio.h>
#include<ctype.h>
void main()
{
int y;
char x;
clrscr();
printf("Enter character or symbol: ");
scanf("%c",&x);
y=toascii(x);
printf("Ascii value of %c is %d",x,y);
getch();
}

OUTPUT:

Leave a Reply

Your email address will not be published. Required fields are marked *