标签:style blog color io ar sp div log amp
1 #include <stdio.h> 2 3 int funk(int n, char **p) 4 { 5 if(n > 0 && n<13) 6 printf("time is %s\n", *(p+n-1)); 7 } 8 9 int main() 10 { 11 char *arr[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; 12 13 int i = 3; 14 char **p = arr; 15 funk(i, p); 16 }
arr数组里面存的是 地址,如果p再想存 arr(数组首地址),就得写成 二级指针 char **p
标签:style blog color io ar sp div log amp
原文地址:http://www.cnblogs.com/luoxiang/p/4035351.html