以下程序段中能够正确实现p和q中两个字符串互换的是:
选项:
A:char p[10]="hello", q[10]= "world", *t;strcpy(t,p); strcpy(p,q); strcpy(q,t);;
B:char p[10]= "hello", q[10]= "world", *t;t=p; p=q; q=t;;
C:char p[10]= "hello", q[10]= "world", t[10];strcpy(t,p); strcpy(p,q); strcpy(q,t);;
D:char p[10]= "hello", q[10]= "world", t[10];t=p; p=q; q=t;
发布时间:2024-05-19 15:22:48