你知道输出结果么?

#include <stdio.h>

void main(void)
{
        int i = 0;
        char str[10] = {1,2,3,4,5,6,7,8,9,10};
        short *ptr = NULL;
        ptr = (short *)str;

        while(i < 10)
        {
                printf("%x
",*(ptr+i));
                i++;
        }

        return ;
}


不上机执行,输出结果:

原文地址:https://www.cnblogs.com/blfshiye/p/4295903.html