Convert C language characters to ASCII code C language characters to ASCII code

Enter description:

a character.

Output description:

One line, output the ASCII code corresponding to the input character

#include <stdio.h>

int main() 
{
    char a=0;
    scanf("%c",&a);
    printf("%d",a);
    return 0;
}

char a=0; //Initialize the input character constant;

Enter the characters you want to convert to ASCII codes, and then use integer output to get the ASCII codes of the input characters.

おすすめ

転載: blog.csdn.net/wangduduniubi/article/details/128515580