小编XII*_*IIX的帖子

如何比较ASCII值

我想将字母的ASCII值存储到变量中,我该怎么做?

例如 :

r ASCII variable = 82
main()
{
    character = "character read from a file";
    variable= "r ascii"; //(in this case 82), the problem is that the letter is always        variable.;
    printf( "the value of %c is %d, character, variable)
}
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?

另外还要注意,我怎样才能.txt逐个字符地读取文件?所以它可以保存在字符变量上.

c text ascii file file-read

2
推荐指数
1
解决办法
5万
查看次数

标签 统计

ascii ×1

c ×1

file ×1

file-read ×1

text ×1