char* a[5]={"student","worker","cadre","soldier","peasant"};高手帮我解释一下谢谢#include "stdio.h"#include "string.h"main(){int i;char* a[5]={"student","worker","cadre","soldier","peasant"};char *p1,*p2;p1=p2=a[0];for(i=0;i0) p1=a[i];if(str
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/26 16:58:12
char* a[5]={"student","worker","cadre","soldier","peasant"};高手帮我解释一下谢谢#include "stdio.h"#include "string.h"main(){int i;char* a[5]={"student","worker","cadre","soldier","peasant"};char *p1,*p2;p1=p2=a[0];for(i=0;i0) p1=a[i];if(str
char* a[5]={"student","worker","cadre","soldier","peasant"};高手帮我解释一下谢谢
#include "stdio.h"
#include "string.h"
main()
{
int i;
char* a[5]={"student","worker","cadre","soldier","peasant"};
char *p1,*p2;
p1=p2=a[0];
for(i=0;i0) p1=a[i];
if(strcmp(a[i],p2)
char* a[5]={"student","worker","cadre","soldier","peasant"};高手帮我解释一下谢谢#include "stdio.h"#include "string.h"main(){int i;char* a[5]={"student","worker","cadre","soldier","peasant"};char *p1,*p2;p1=p2=a[0];for(i=0;i0) p1=a[i];if(str
这一句的意思是:定义一个char类型的指针数组,也就是说,在a[5]这个数组中有5个字符型的指针元素,然后将{"student","worker","cadre","soldier","peasant"}分别赋值给这五个指针.
结果是a[0]="student",a[1]="worker",a[2]="cadre",a[3]="soldier",a[4]="pessant".