#include<stdio.h>
#include<string.h>
int main(){
printf("char arg1[]={\"one1\"}\n");
char arg1[]={"one1"};
printf("%s\n\n",arg1);
printf("char *arg2={\"one2\"}:\n");
char *arg2={"one2"};
printf("%s\n\n",arg2);
printf("char arg3[][10]={\"one3\",\"two3\"}:\n");
char arg3[][10]={"one3","two3"};
printf("%s\n%s\n\n",arg3[0],arg3[1]);
printf("char *arg4[]={\"one4\",\"two4\"}:\n");
char *arg4[]={"one4","two4"};
printf("%s\n%s\n\n",arg4[0],arg4[1]);
printf("char **ar=arg4:\n");
char **ar=arg4;
printf("%s\n%s\n\n",*ar,*(ar+1));
putchar(10);
return 0;
}
指针数组什么的真麻烦
最新推荐文章于 2023-07-07 21:14:30 发布