Write a program to take two characters as input from the user and display their ASCII equivalent.


[ TU,BBA,2009,makeup]
Solution:

#include<stdio.h>
#include<conio.h>
main()
{
char c1,c2;
printf(“enter two characters”);
scanf(“%c%c”,&c1,&c2);
printf(“the ASCII equivalent of %c is %d and %c is %d”,c1,c1,c2,c2);
getche();
}

0 comments:

Feel free to contact the admin for any suggestions and help.