bin to asc
来源:互联网 发布:正版广联达软件多少钱 编辑:程序博客网 时间:2024/05/22 00:07
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
FILE *fdb = NULL;
FILE *fda = NULL;
unsigned char c;
char h[2];
if (argc!=2)
return -1;
if (NULL == argv[1])
return -1;
fdb = fopen(argv[1], "rb");
if(NULL == fdb)
return -1;
fda = fopen("asc.txt", "wb");
if (NULL == fda) {
fclose(fdb);
return -1;
}
while(fread(&c, 1, 1, fdb) != 0) {
//printf("%d", c);
sprintf(h, "%2x", c);
if (h[0] == ' ')
h[0] = '0';
fprintf(fda, "%c", h[0]);
fprintf(fda, "%c", h[1]);
//printf(" = %c%c/n", h[0], h[1]);
}
fclose(fda);
fclose(fdb);
return 0;
}
- bin to asc
- asc to bin
- str to asc or asc to str
- asc
- FTP中传输模式:BIN与ASC的差别
- ASC Table, Convert String to Hex String
- convert Hex to Bin
- bin to npy
- Redirecting to /bin/systemctl
- add bin path to $PATH
- fromelf converts axf to bin directory instead of bin file
- how to insert a talbe making the no asc by one step
- ASC II
- ASC码表
- ASC码表
- ASCⅡ
- ASC码
- asc码
- Unit测试例子
- compiz.ppt
- CSDN 终于恢复运行
- CSS学习笔记:级联和继承
- symfoware数据库
- bin to asc
- 实现Singleton模式
- .NET 3.5 & VS2008 新特性
- asc to bin
- 设计模式---状态模式(今天CSDN竟然上不去,暂时发在这里) (从百度空间转回来的)
- Asp.net MVC说明(Preview 4)
- WinCE Display驱动开发介绍
- CSDN终于可以访问了!!
- HQL: Hibernate查询语言