10-Write a C program to find the ASCII value of a character.
Program: 10
Write a C program to find the ASCII value of a character.
#include#includevoidmain(){charname;intx;printf("Enter any character: ");scanf("%c",&name);x=name;printf("The ASCII value of %c is: %d",name,x);getch();}
Output
Enter any character: s The ASCII value of s is: 115
Lokesh Kumar: Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.
Leave a Comment