Input a character from user and print its ASCII value.
#include <stdio.h>
#include <conio.h>
void main ( )
{
char x;
clrscr ( );
printf ("\n\n\n\t\t Input a character..:"); scanf ("%c",&x);
printf("\n\n\n\t\t ASCII value of '%c' is %d", x, x);
getch ( );
}
Click here to contact us
#include <stdio.h>
#include <conio.h>
void main ( )
{
char x;
clrscr ( );
printf ("\n\n\n\t\t Input a character..:"); scanf ("%c",&x);
printf("\n\n\n\t\t ASCII value of '%c' is %d", x, x);
getch ( );
}
Click here to contact us
No comments:
Post a Comment