ZIP汉字与十六进制互转,输入1汉字转十六进制,输入2十六进制转汉字 47.48KB

weixin_53569144

资源文件列表:

汉字与十六进制互转.zip 大约有10个文件
  1. main.c 1.08KB
  2. main.o 1.65KB
  3. Makefile.win 1.16KB
  4. 转换.dev 939B
  5. 转换.exe 132.13KB
  6. 转换.ico 2.19KB
  7. 转换.layout 93B
  8. 转换_private.h 583B
  9. 转换_private.rc 91B
  10. 转换_private.res 2.45KB

资源介绍:

工程可在dev软件中打开,压缩包中带有exe文件,可在window下直接执行
#include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ #define MAX_NUM 100 int main() { unsigned char hanzi[MAX_NUM] = {0}; unsigned char hex[MAX_NUM] = {0};//0xB0,0xAE,0xCE,0xD2,0xD6,0xD0,0xBB,0xAA int i = 0; int flag; do { printf("汉字转十六进制输入1\n十六进制转汉字输入2\n请输入:"); scanf("%d",&flag); if(flag == 1) { printf("请输入汉字:"); scanf("%s",&hanzi); printf("输入汉字的十六进制为:"); for (i = 0; i < MAX_NUM; i++) { if(hanzi[i] == '\0') { break; } printf("%02X ",hanzi[i]); } printf("\n"); } else if(flag == 2) { printf("请输入十六进制的数:"); while (getchar() != '\n') { ; } i = 0; do{ scanf("%x",&hex[i]); i++; if(i >= MAX_NUM) { break; } }while(getchar()!='\n');//遇到换行时结束循环 printf("输入十六进制的汉字为:"); printf("%s\n",hex); } else { printf("输入错误,请重新输入1或2!!!\n"); } }while(1); return 0; }
100+评论
captcha
    类型标题大小时间
    ZIP仿YouTube版PHP视频上传分享程序.zip98.55MB8月前
    ZIP支付宝小程序商品加入购物车动画 2020年的代码不知道还能不能用1.82KB8月前
    ZIP20240807000000661587.zip149.22KB8月前
    ZIPboot loader升级程序9.74MB8月前
    ZIP智云CMS影音程序PHP源码V3.0.zip3.05MB8月前
    ZIPVisdom静态资源文件,用来解决启动visdom时卡在下载阶段1.3MB8月前
    ZIPkea128工程统一部份63.61KB8月前
    ZIPssm高校专业信息管理系统设计与实现 源码+文档+数据库44.67MB8月前