概念:
一个数组的元素均是指针,则该数组称为指针数组。
使用指针数组处理字符串非常适合。由于字符串长度不定,使用二维字符数组处理会大量浪费存储空间。
代码示例:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int i,j,len;
char *temp;
char *str[5];
printf("请输入5个字符串:\n");
temp=(char *)malloc(80);