printf打印字节

int i = 0;
printf("buf:");
for(i = 0; i < sizeof(buf); i++)
{
	printf("0x%x", *(buf + i) >> 4 & 0xf)
	printf("%x ", *(buf + i) & 0xf);
}
printf("\n");
int i = 0;
printf("buf:");
for(i = 0; i < sizeof(buf); i++)
{
	printf("0x%x ", *(buf + i))
}
printf("\n");

printf打印字节调试https://blog.csdn.net/zhangxuechao_/article/details/95496244
printf颜色https://blog.csdn.net/zhangxuechao_/article/details/72983585

posted @ 2016-03-06 17:30  thomas_blog  阅读(636)  评论(0编辑  收藏  举报