此题为判断题(对,错)。
第1题:
下列选项中,能够满足“若字符串s1等于字符串s2,则执行ST”要求的是( )。
A.if(strcmp(s2,s1)==0)ST;
B.if(s1===s2)ST;
C.if(strcpy(s1,s2)==1)ST;
D.if(s1,s2==0)ST;
第2题:
以下程序的运行结果是( )。 #include <stdio.h> main() { st,uct date {int year,month,day;}today; printf("%d\n",sizeof(struct date)); }
A.6
B.8
C.10
D.12
第3题:
35、以下程序的运行结果是___________。 void print(char *s){ printf("%s", s); } int main(){ char *p, *q; char str[]="Hello, World\n"; q=p=str; p++; printf(q); printf(p); return 0; }
A.H e
B.Hello, World ello, World
C.Hello, World Hello, World
D.ello, World llo, World
第4题:
下列选项中,能够满足“若字符串sl等于字符串s2,则执行ST”要求的是( )。
A.if(stremp(s2,s1)==0)ST;
B.if(s1==s2)ST;
C.if(strcpy(sl,s2)==l)ST;
D.if(sl,s2==O)ST;
第5题:
第6题:
下列选项中,能够满足“若字符串s1等于字符串s2,则执行ST”要求的是()。
A.if(strcmp(s2,s1)==0) ST;
B.if(s1==s2) ST;
C.if(strcpy(s1,s2)==1) ST;
D.if(s1-s2==0) ST;