Write a program to find ASCII value of any character

Program : -


#include<stdio.h>
#include<conio.h>

void main()
{
        char c;
        printf("Enter a character :");
        scanf("%c",&c);
        printf("ASCII value of  %c is %d",c,c);
        getch();
}



Output : -

Enter a character :G
ASCII value of G is 71