![](https://lstatic.shangxueba.com/jiandati/pc/images/pc_jdt_tittleico.png)
若有定义char s[6],*ps=s;则正确的赋值语句是()。
A.ps="12345";
B.s="12345";
C.*s="12345";
D.*ps="12345";
![](https://lstatic.shangxueba.com/jiandati/pc/images/jdt_q_ckda.png)
![](https://lstatic.shangxueba.com/jiandati/pc/images/jdt_panel_vip.png)
![](https://lstatic.shangxueba.com/jiandati/pc/images/jdt_q_wyda.png)
- · 有6位网友选择 A,占比50%
- · 有5位网友选择 C,占比41.67%
- · 有1位网友选择 B,占比8.33%
A.ps="12345";
B.s="12345";
C.*s="12345";
D.*ps="12345";
A、cc数组的两个元素分别存放的是含有4个字符的一维字符数组的首地址
B、cc数组的两个元素中各自存放了字符串"1234"和"5678"的首地址
C、cc是指针变量,它指向含有两个数组元素的一维字符数组
D、cc数组元素的值分别是"1234"和"5678"
A、6
B、9
C、7
D、5
A、void strcpy4(char *p1,char *p2) { while (*p2) *p1++=*p2++ ; }
B、void strcpy1(char *p1,char *p2) { while ((*p1++=*p2++)!='\0') ; }
C、void strcpy2(char *p1,char *p2) { while ((*p1=*p2)!='\0') { p1++; p2++; } }
D、void strcpy3(char *p1,char *p2) { while (*p1++=*p2++) ; }
A、strcpy(s3,"string1");
B、strcpy(s1,"string2");
C、strcpy(s2,s4);
D、strcpy(s2,s1);
A、int strcmp2(char *s,char *t) { for ( ; *s++==*t++; ) if (!*s) return 0 ; return (*s-*t) ; }
B、int strcmp1(char *s,char *t) { for ( ; *s++==*t++; ) if (*s=='\0') return 0 ; return (*s-*t) ; }
C、int strcmp3(char *s,char *t) { for ( ; *t==*s; ) { if (!*t) return 0 ; t++ ; s++ ; } return (*s-*t) ; }
D、int strcmp4(char *s,char *t) { for ( ; *s==*t;s++,t++ ) if (!*s) return 0 ; return (*t-*s) ; }
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!