标题:c语言中指针数组
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
char * arr[3];
for(int i = 0;i < 3;i++){
arr[i] = (char *)malloc(sizeof(char *) * 10);
}
for(int i = 0;i < 3;i++){
scanf("%s",arr[i]);
}
for(int i = 0;i < 3;i++){
printf("%s --> %d\n",arr[i],strlen(arr[i]));
}
return 0;
}