
【C语言学习笔记(一)】ASCII码转字符
一、要求 提示输入一个ASCII码值(如,66),然后打印输入的字符。 二、程序 使用printf()函数进行强制转换。
#include <stdio.h> int main() { int ascii; printf("Enter an ASCII code:"); scanf("%d",&ascii); printf("%d is the ASCII code for %c.\\n",ascii,ascii);//printf()函数类型强制转换 return 0; }三、结果
👁️ 阅读量:0
© 版权声明:本文《【C语言学习笔记(一)】ASCII码转字符》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686628774a309957.html。