C指针数组

#include<stdio.h>
#include<stdlib.h>

int main(void)
{

    char const *str[] = {
        "this is a pointer array test.",
        "welcome to here!",
        "hello,hello,hehe."
    };

    char const **temp;
    int size = sizeof(str)/sizeof(str[0]);
    printf("%ld
", sizeof(str));
    printf("%ld
", sizeof(str[0]));

    for(temp=str; temp<str+size; temp++)
    {
        printf("%s
", *temp);
    }

    return EXIT_SUCCESS;
}
原文地址:https://www.cnblogs.com/yshyee/p/3936343.html