单项选择题

设有如下程序段:
int x=2002, y=2003;
printf(" % d\n", (x, y));
则以下叙述中正确的是______。

A.输出语句中格式说明符的个数少于输出项的个数,不能正确输出
B.运行时产生出错信息
C.输出值为2002
D.输出值为2003
<上一题 目录 下一题>
热门 试题

单项选择题
以下程序中函数setup的功能是返回形参指针s1和s2所指字符串中较小字符串的首地址: # include<stdio. h> # include<string. h> char * scmp(char * s1, char * s2) if(strcmp(s1, s2)<0) return(s1); else return(s2); main() int i; char string[20], str[3][20]; for(i=0; i<3; i++)gets(str[i]); strcpy(string, scmp(str[0], str[1])); strcpy(string, scmp(string, str[2])); printf( % s n , string); 若运行时依次输入:abcd、abba和abc3个字符串,则输出结果为______。
A.abcd
B.abba
C.abc
D.abca
单项选择题
有以下程序: void swapl(int c0[], int c1[]) int t; t=co[o]; co[o]=o1[o]; c1[o]=t; void swap2(int * c0, int * c1) int t; t=*c0; *c0=*c1; *c1=t; main() int a[2]=3, 5, b[2]=A3, 5); swapl(a, a+1); swap2(&b[0], &b[1]); printf( %d%d%d%d n , a[0], a[1], b[0],b[1]); 程序运行后的输出结果是______。
A.3 5 5 3
B.5 3 3 5
C.3 5 3 5
D.5 3 5 3
相关试题
  • 有以下程序: main() int a=1, b...
  • 有以下程序: void swapl(int c0[]...
  • 以下程序中函数setup的功能是返回形参指针s...
  • 有以下程序: int f(int b[][4])...
  • 以下程序的输出结果是______。 int...