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\n", sizeof(str));

    printf("%ld\n", sizeof(str[0]));



    for(temp=str; temp<str+size; temp++)

    {

        printf("%s\n", *temp);

    }



    return EXIT_SUCCESS;

}

 

你可能感兴趣的:(数组)