#include<stdio.h>
#include<stdlib.h>
int main()
{
//指针数组:存放的是指针数据===地址 用于存放字符串比较方便 :因为字符指针的定义:char *str="string";
char *pa[5]= {"I love you 3000 times!","Just do it!","Everything is possible!","Do it!","Nice!"};
//char *str="string";
int i;
for(i=0;i<5;i++)
{
printf("%s\n",pa[i]);
}
//数组指针:指向数组的指针
int (*b)[5];//数组指针 数组长度为5
int temp[5]={1,2,3,4,5};
b=&temp;//指向temp
for(i=0;i<5;i++)
{
printf("%d\n",*(*b+i));// *b:表示数组的第一个元素地址
}
int *q=temp;//指向数组第一个元素
for(i=0;i<5;i++)
{
printf("%d\n",*(q+i));
}
}