#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char tad[]="534D533133343235363834373233";
unsigned char x;
char hex[3];
int len=strlen(tad)/2*2;
char *p=tad,*endp=tad+len;
while(p<=endp){
memcpy(hex,p,2);
hex[2]='\0';
sscanf(hex,"%2X",&x);
printf("%X(%u) ",x,x);
p+=2;
}
return 0;
}53(83) 4D(77) 53(83) 31(49) 33(51) 34(52) 32(50) 35(53) 36(54) 38(56) 34(52) 37(55) 32(50) 33(51) 33(51)
Process returned 0 (0x0) execution time : 0.031 s
Press any key to continue.
温馨提示:答案为网友推荐,仅供参考