单选题阅读下列程序,当运行函数时,输入asd af aa z67,则输出为 #include <stdio.h> #include <ctype.h> #include <string.h> int fun(char*str) int i,j=0; for(i=0;str[i]!='/0';i++) if(str[i]!='')str[j++]=str[i]; str[j]='/0'; main() char str[81]; int n; printf("Input a string:"); gets(str); puts(str); fun(str); printf("%s/n",str);
单选题若有说明语句:int a,b,c,*d=&c:,则能正确从键盘读入三个整数分别赋给变量a、b、c的语句是
单选题设p1和p2是指向一个血型一维数组的指针变量,k为int型变量,则不能正确执行的语句是
单选题有以下程序
#include <stdio.h>
main()
{ int i,j,m=55;
for(i=1;i<=3;i++)
for(j=3;j<=i;j++) m=m%j;
printf("%d/n",m);
}
程序的运行结果是______。
单选题以下选项中不能作为C语言合法常量的是( )。
单选题下列叙述中错误的是( )。 A) 在程序中凡是以“#”开始的语句行都是预处理命令行 B) 预处理命令行的最后不能以分号表示结束 C) #define MAX是合法的宏定义命令行 D) C程序对预处理命令行的处理是在程序执行的过程中进行的
单选题设有定义:“long x=123450L;”,则以下能够正确输出变量x的是( )。
单选题有以下程序,程序运行后的输出结果是 #include main(){int x,y,z;x=y=1; z=x++,y++,++y; printf("%d,%d,%d\n",x,y,z);}
单选题以下正确的描述是:在C语言程序中______。
单选题如果需要打开一个已经存在的非空文件"FILE''并进行修改,正确的语句是( )。
单选题以下叙述中正确的是
单选题有以下程序: #include <stdio.h> int f(int
n) {if(n==1) return 1; else return f(n-1)
+1; } main() { inti, j=0;
for(i=1; i<3; i++) j+=f(i); print("%d/n", j); }
程序运行后的输出结果是( )。
A. 4
B. 3
C. 2
D. 1
单选题有如下程序: #include<stdio.h> main() char ch[2][5]= "6937", " 8254"), *p[2]; int i, j, s=0; for(i=0; i<2; i++) p[i]=ch[i]; for(i=0; i<2; i++) for(j=0; p[i][j]>'/0'; j+=2) s=10*s+p[i][j]-'0'; printf("%d/n", s); 该程序的输出结果是( )。 A) 69862358 B) 5825 C) 6385 D) 693825
单选题简单的交换排序方法是( )。 A.快速排序 B.选择排序 C.堆排序 D.冒泡排序
单选题有以下结构体说明,变量定义和赋值语句: struct STD char name[10]; int age; char ***; s[5],*ps; ps=&s[0]; 则以下scanf函数调用语句中错误的结构体变量成员是______。
单选题若有下面的说明和定义: struct test { int m1;
char m2; float m3; union uu { char
u1[5]; int u2[2]; } ua; }
myaa; 则sizeof(struct test)的值是______。
A.12
B.16
C.14
D.9
单选题若有以下程序
#include<stdio.h>
main()
{char cl, c2;
c1="C"+"8"-"3"; c2="9"-"0";
printf("%c %d/n", c1, c2);
}
则程序的输出结果是______。
单选题软件设计中划分模块的一个准则是______。
单选题以下程序运行后的输出结果是 ______。 main() int a,b,c; a=10;b=20;c=(a%b<1)||(a/b>1); printf(“%d %d %d/n",a,b,c); A) 10 20 0 B) 20 10 0 C) 10 10 0 D) 20 20 0
单选题下列叙述中正确的是 A) 栈是“先进先出”的线性表 B) 队列是“先进后出”的线性表 C) 循环队列中元素的个数是由队头指针和队尾指针共同决定的 D) 循环队列中队头指针是固定不变的