单项选择题
有以下程序(strcpy为字符串复制函数,strcat为字符串连接函数):
# include <stdio.h>
# include <string.h>
main()
char a[10]="abc", b[10]="012", c[10]="xyz";
strcpy(a+1, b+2);
puts(strcat(a, c+1));
程序运行后的输出结果是( )。
A.a12xyz
B.12yz
C.a2yz
D.bc2yz
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: # include <stdio.h> # define N 3 void fun(int a[][N], int b[]) int i, j; for(i=0; i<N; i++) b[i]=a[i][0]; for(j=i;j<N;j++) if(b[i]<a[i][j])b[i]=a[i][j]; main() int x[N][N]=(1, 2, 3, 4, 5, 6, 7, 8, 9), y[N], i; fun(x,y); for(i=0; i<N; i++) printf( %d, , y[i]); printf( n ); 程序运行后的输出结果是( )。
A.2, 4, 8,
B.3, 6, 9,
C.3, 5, 7,
D.1, 3, 5,
点击查看答案&解析
单项选择题
若有定义语句int b=2; ,则表达式(b<<2) (3||b)的值是()。
A.4
B.8
C.0
D.2
点击查看答案&解析
相关试题
以下函数的功能是输出链表结点中的数据,形...
以下程序的输出结果是______。 # ...
若有定义语句:char str[]= 0 ;,...
有以下程序: # include <stdio.h>...
有以下程序: # include <stdio.h>...