C- Program :
#include <stdio.h>
int main()
{
char ch;
printf("Enter The Charecter : ");
scanf("%c",&ch);
printf("The Ascii value of '%c' is '%d'\n",ch,ch);
getch();
return 0;
}
OUTPUT :
Enter The Charecter : A
The Ascii value of 'A' is '65'
#include <stdio.h>
#include <conio.h>
int main()
{
char ch;
printf("Enter The Charecter : ");
scanf("%c",&ch);
printf("The Ascii value of '%c' is '%d'\n",ch,ch);
getch();
return 0;
}
OUTPUT :
Enter The Charecter : A
The Ascii value of 'A' is '65'



0 comments:
Post a Comment