char* a[5]={"student","worker","cadre","soldier","peasant"};
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/19 21:02:15
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)
#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]这个数组中有5个字符型的指针元素,然后将{"student","worker","cadre","soldier","peasant"}分别赋值给这五个指针.
结果是a[0]="student",a[1]="worker",a[2]="cadre",a[3]="soldier",a[4]="pessant".
结果是a[0]="student",a[1]="worker",a[2]="cadre",a[3]="soldier",a[4]="pessant".
#include#includevoidmain(){ char*a[5]={"student","worker","c
he is from() andi am from()A.a worker family;a peasant famil
He was born of a peasant family.和He was born in a worker's f
linda ____a student.She is a worker.
农民工到底用migrant worker还是peasant worker
英语翻译A soldier,a worker,a young woman and a little old lady w
设S='I am a student',T='good',Q='worker'.求:
数据结构,设s=“I AM A STUDENT”,t=“GOOD”,q=“WORKER”.
A.若有以下说明和语句:struct stu { int no; char *name; }student,*p=&st
main() { char a[]={'a','b','c','d'}; char *p=(char *)(&a+1);
void fun (char *a,char *b) {a=b} void main() {char c1='A',c2
以下合法的数组定义a.char a[]="string"; b.char a[6]="string";c.int a[5