题解 | #字符转ASCII码#

字符转ASCII码

https://www.nowcoder.com/practice/93f4d05a02d9468db424ed4316bfc8fd

#include<stdio.h>
int main()
{
    int a;
    scanf("%c",&a);
    printf("%hhd",a);//%hhd对应char,%hd对应short,%d对应int,%ld对应long,%lld对应long long
    return 0;
}

总结:

%hhd对应char,

%hd对应short,

%d对应int,

%ld对应long,

%lld对应long long

全部评论

相关推荐

一天代码十万三:实习东西太少了,而且体现不出你业务,3个月不可能就这点产出吧,建议实习多写点,玩具项目面试官都不感兴趣的
点赞 评论 收藏
分享
coffrar:全都是已读😅沟通一千五百多个了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务