在使用malloc函数给指针分配内存之后为什么使用编译器打印不出地址。代码如下,编译器为vs2015

#include

#include

void main() {

char  *s[10];

int  i;
for (i = 0;i < 10;i++)
{
    if ((s[i] = (char *)malloc(128)) == NULL)
        printf("\nerror\n");
    exit(0);

}

for (i = 0;i < 10;i++) {
    printf("\ns[%i}=%x", i, s[i]);

    free(s[i]);


}
getch();
system("pause");

}

 #include <conio.h>
#include <stdlib.h>
#include<stdio.h>
void main()
{
    char  *s[10];

    int  i;
    for (i = 0;i < 10;i++)
    {
        if ((s[i] = (char *)malloc(128)) == NULL)
        {//加个大括号
            printf("\nerror\n");
            exit(0);
        }//加个大括号
    }

    for (i = 0;i < 10;i++) {
        printf("\ns[%i}=%x", i, s[i]);

        free(s[i]);

    }
    getch();
    system("pause");
}


that's all right!Thanks!