单项选择题

有以下程序:
#include <string.h>
main()
chaur p[20]='a','b','c','d'),q[]="abc",r[]="abcde";
strcpy(p+strlen(q),r); strcat(p,q);
printf("%d %d\n",sizeof(p),strlen(p));

程序运行后输出的结果是( )。

A.20 9
B.9 9
C.20 11
D.11 11
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: main() int a[4][4]=1,4,3,2,8,6,5,7,3,7,2,5,4,8,6,1,i,k,t; for (i=0;i<3; i++) for(k=i+1;k<4;k++)if(a[i][i] for (i=0; i<4; 1++) printf( %d, , a[0][i]); 程序运行后输出的结果是( )。
A.6,2,1,1,
B.6,4,3,2,
C.1,1,2,6,
D.2,3,4,6,
单项选择题
有以下函数: int fun(char *s) char*t=s; while(*t++); return(t-s); 该函数的功能是( )。
A.比较两个字符串的大小
B.计算s所指字符串占用内存字节的个数
C.计算s所指字符串的长度
D.将s所指字符串复制到字符串t中
相关试题
  • 有以下程序: #include <stdio.h> ...
  • 若程序中有宏定义行:#define N 100...
  • 有以下程序: void main() int num[...
  • 若有以下语句: typedef struct s int...
  • 有以下程序: #include <stdio.h> m...