19)若变量已正确定义,有以下程序段int a=3,b=5,c=7;if(a>Ba=b; c=a;if(c!=Ac=b;printf("%d,%d,%dn",a,b
38)变量a中的数据用二进制表示的形式是01011101,变量b中的数据用二进制表示的形式是11110000。若要求将a的高4位取反,低4位不变,所要执行的运算是(A)a^b (B)a|b (C)a&
39)在C语言中,只有在使用时才占用内存单元的变量,其存储类型是(A)auto和register (B)extern和register (C)auto和static (D)static和registe
20)若有定义:float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是(A)switch(x){case 1.0:printf("*n");
40)设有定义语句int (*f)(int);,则以下叙述正确的是(A)f是基类型为int的指针变量 (B)f是指向函数的指针变量,该函数具有一个int类型的形参(C)f是指向int类型一维数组的指
21)有以下程序#include main0{ int y=9;for( ; y>0;y--)if(y%3==0) printf("%d",--y);}程序的运行结
22)以下描述中正确的是(A)由于do-while循环中循环体语句只能是一条可执行语句,所以循环体内不能使用复合语句(B)do-while循环由do开始,用while结束,在while(表达
23)有以下程序#include main(){ int a[ ]={1,2,3,4},y,*p=&a[3];--p; y=*p;printf("y=%dn",y);
24)以下数组定义中错误的是(A)int x[][3]={0}; (B)int x[2][3]={{l,2},{3,4},{5,6}}; (C)int x[][3]={{l,2,3},{4,
25)下面说明不正确的是(A)char a[10]="china"; (B)char a[10],*p=a;p="china" (C)char *a;
26)若有定义:int a[2][3];,以下选项中对a数组元素正确引用的是(A)a[2][!1] (B)a[2][3] (C)a[0][3] (D)a[1>2][!1]
27)若要求从键盘读入含有空格字符的字符串,应使用函数(A)getc() (B)gets() (C)getchar() (D)scanf()
28)阅读下列程序段,则程序的输出结果为#include "stdio.h"#define M(X,Y)(X)*(Y)#define N(X,Y)(X)/(Y)main(
29)在16位IBM-PC机上使用C语言,若有如下定义struct data{ int i;char ch;double f;} b;则结构变量b占用内存的字节数是(A)1 (B)2 (C)
30)有以下程序 #includemain(){FILE *fp; int i,a[6]={l,2,3,4,5,6};fp=fopen("d3.dat","w+
31)有以下程序#include main(){ int s[12]={1,2,3,4,4,3,2,1,1,1,2,3},c[5]={0},i;for(i=0;i<12;i++) c[
32)有以下程序#include void fun(int *a,int n)/*fun函数的功能是将a所指数组元素从大到小排序*/{ int t,i,j;for(i=0;i<n-1;
33)下面程序的输出结果是#include#includemain(){ char *p1="abc",*p2="ABC",str[50]= &quo
34)以下函数返回a所指数组中最小的值所在的下标值fun(int *a, int n){ int i,j=0,p;p=j;for(i=j;i<n;i++) if(a[i](A)i=p(
35)下列程序的运行结果为#includevoid abc(char*str){ int a,b;for(a=b=0;str[a]!='';a++)if(str[a]!=
36)有以下程序#include #include typedef struct{ char name[9]; char sex; float score[2]; }STU;void f(S
37)有以下程序#include main(){ FILE *fp; int a[10]={1,2,3},i,n;fp=fopen("d1.dat","w&q
38)已知 int a=1,b=3则a^b的值为(A)3 (B)1 (C)2 (D)4
39)阅读下列程序,则运行结果为#include "stdio.h"fun(){ static int x=5;x++;return x;}main(){ int i,x
40)有以下程序#include void fun(char *t,char *s){ while(*t!=0) t++;while((*t++=*s++)!=0);}main(){ cha