#include<stdio.h>
typedef unsigned char *bytePointer;
void bytesShow(void *a, size_t len)
{
bytePointer p = (bytePointer) a;
for (int i = 0; i < len; i++)
printf("%.2x ", *(p + i));
puts("");
}
int main()
{
int a = 10;
float b = 10;
double c = 10;
char *s = "我们都是";
bytesShow(&a, sizeof(int));
bytesShow(&b, sizeof(float));
bytesShow(s, sizeof(s));
bytesShow(&c, sizeof(double));
return 0;
}