C Program to Print ASCII Value

 

C Program to Print ASCII Value

#include <stdio.h>

#include <conio.h>

 void main()

 { 

    char a;

    printf("Enter a  valid character: ");

    scanf ("%c", &a); 

printf("ASCII value of  valid character %c = %d", c, c);

    getch();

} 

Output:

Enter a valid character: f

ASCII value of valid character f = 102 

Comments

Popular posts from this blog

C Program to print swap number using third variables

C Program to open and write to a text file using fprintf.