Have a Read!

Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!

Thursday, January 27, 2011

C PROGRAM GOR ASCII CODE way1

The following code will get the ASCII code of the character entered by the user
#include<stdio.h>
int main()
{
int x;
char character;
printf("ENTER THE CHARACTER\n");
scanf("%c",&character);
x=character;
printf("THE ASCII VALUE OF %c is %d\n",character,x);
return 0;
}

No comments:

Post a Comment

Related Posts with Thumbnails