请认准浙江省自考网,本站发布自考相关内容资讯,详细信息以浙江省教育考试院为准。
咨询报名热线:13450267658
2024浙江地区自考备考指南
首页 > 自考题库 > 历年真题 > 工学类
2024年4月浙江省自学考试《计算机基础与程序设计》试题(1)

一、单项选择题(本大题共20小题,每小题1分,共20分)

在每小题列出的四个备选项中只有一个是符合题目要求的,请将其代码填写在题后的括号内。错选、多选或未选均无分。

1.下面哪种设备是输入设备?(     )

A.键盘                                                      B.打印机

C.显示器                                                D.投影仪

2.与十进制39等值的二进制数是(     )

A.00100111                                               B.01001001

C.10100111                                               D.01011000

3.设有 int a=3,b=-4;表达式(a<b)? a b:(a-b,b 4,a-=b 4)的值是(     )

A.-1                                                          B.0

C.3                                                        D.7

4.设有int a=3,b=-4,c=5;表达式a=b=c=6 3/5的值是(     )

A.3                                                           B.4

C.6                                                        D.6.6

5.以十进制无符号形式输出整数的格式说明符是(     )

A. %u                                                       B.% x

C.%o                                                     D.%d

6.下列程序段执行后的输出结果为

int i =-1;

if(i<=0)    printf("* * * * \n");

else printf ("%%%%\n");  (      )

A. * * * * c                                               B.% % % %

C. % % % % c                                          D.** * *

7.执行下面程序段后的y值是

int y=l, x=5;

if(x<0)y=-1;

if(x>=0)y=0;  (      )

A.-1                                                          B.0

C.1                                                        D.5

8.执行while(表达式)结构循环的条件是(     )

A.当表达式的值为0时                           B.仅当表达式的值为l时

C.当表达式的值为非0时                       D.当表达式的值不为1时

9.下面程序段的输出结果是

a=100;

while (a>120)

a= a l;

printf ("%d", a);  (      )

A.100                                                       B.101

C.120                                                     D.121

10.下面程序执行后,i的值是

main()

{   int  a[5]={1,2,3,4,5),i =2;

printf ("%d",a[ i ]);

} (      )

A.1                                                        B.2

C.3                                                        D.4

11.关于函数调用以下错误的描述是(      )

A.函数调用可以出现在执行语句中

B.函数调用可以出现在一个表达式中

C.函数调用可以作为一个函数的实参

D.函数调用可以作为一个函数的形参

12.C语言关于递归调用的规则是(     )

A.既允许直接递归调用,也允许间接递归调用

B.不允许直接递归调用,也不允许间接递归调用

C.允许直接递归调用,不允许间接递归调用

D.不允许直接递归调用,允许间接递归调用

13.设有语句int a[4][10],* p= * a;则下列表达式中属于地址表达式的是(     )

A.a[1][2]                                                B.a[1]

C. * (p 1 * 10 2)                                    D.*(a[1] 2)

14.下面声明语句正确的是(     )

A. int a, * p=a;                                           B.inta, * p = & a;

C. int * p= a,a;                                           D.int* p = & a, a;

15.下面定义不正确的是(     )

A. struct star                                             B.structstar

{                                  {

int id;                              int id;

char * name;                         char * name;

}starl = {1001,"Moon"};                }; starl = {1001,"Moon"};

C. struct                                                   D.struct star

{                                   {

int id ;                               int id ;

char * name ;                           char* name ;

} starl = {123,"Sun"} ;                  } starl ;

16.下面列出的位运算符中,表示按位异或操作的是(     )

A.~                                                         B.!

C.^                                                         D.&

17.下面各个位运算符的优先级从左到右依次升高的是(     )

A. | ^ & > >                                               B.^ > > & ~

C. > > | ^ ~                                             D.~ | & > >

18.设有说明:int u=l,v=14;

表达式u -v > >2的值是 (      )

A.0                                                           B.3

C.4                                                        D.7

19.如果文件存储的是数据在内存中时存放的字节形式,则该文件是(     )

A.ASCII码文件                                        B.文本文件

C.二进制文件                                         D.设备文件

20.正确使用fopen函数打开C盘根目录下abc . dat文件进行读写的语句是(     )

A. fopen ("c:\abc.dat","w ");              B.fopen("c:\adc.dat","r ");

C. fopen("c:\\abc.dat","w");                D.fopen("c:\\abc.dat","r "):

二、多项选择题(本大题共5小题,每小题2分,共10分)

在每小题列出的五个备选项中至少有两个是符合题目要求的,请将其代码填写在题后的括号内。错选、多选、少选或未选均无分。

21.下面属于合法的C标识符有(          )

A._123                                                      B.abc

C.123_                                                   D.abc.c

E.ab_123

22.若所用变量已正确定义,以下各程序段执行后,变量x值相等的有(          )

A.x=0;                                                    B.x=0;i=0;

for (i=0;i<=3;i )                     while(i<3)

x=i x;                           {   x=i x;

                                          i ;

}

 

C.for(i=0;i<5;i )                        D.x=0;i=0;

x=i x;                          lop: x=i x;

                                            i ;

                                             if( i < =3) goto lop;

E.i=0;x=0;

do{ x=x i;i=i 1;

}while(i<=3);

23.设有声明int x[5]={2,4,6,8,10);下面表达式的结果为2的有(          )

A.a[o]                                                       B.a[3]-a[2]

C.(a[4]-a[2])/2                                           D.a[3]-a[0]

E.a[0]/2 a[l]/4

 

 

24.设有如下定义及赋值:

int a[5]={1,2,3,4,5), * p;

p=a;

则可以输出元素值为3的语句有(          )

A. printf ("%d\n",a 2);                           B.printf ("%d\n",p 2);

S. printf ("%d\n",p[2]);                        D.printf ("%d\n",* (p 2));

E. printf ("%d\n",a[3]);

25.下面关于结构体类型的定义正确的有(          )

A. struct ABC                                            B.struct tree

{                                   {

int a,                                int branch;

char b,                              char name[20];

char * p,                             char * relation;

};                                  };

C. struct ABC                                            D.struct tree

{                                                              {

int a;                                                         intbranch,

char b;                                                      charname[20],

char *p ;                                                   char*relation,

};                                                             };

E. struct

{

char name[20];

int weight;

int sex;

};


标签: 浙江自考 浙江自考模拟 浙江自考真题 浙江自考练习题 浙江自考网
URL: https://zj.zikaoguo.com/tiku/linianzhenti/gongxuelei/2412.html
文章来源:http://m.zj.zikaoguo.com/tiku/linianzhenti/gongxuelei/2412.html(转载请注明出处)

自考东培题库

浙江自考网,为浙江自考考生提供专业免费的自学考试资讯、提供浙江自考本科官网报名入口、、自考本科、自考大专的考前辅导培训,提供便捷的自考成绩查询、自考院校、自考专业等等丰富的自考资讯,同时,也为广大参加浙江自考的考生提供丰富的自考学习资料。

我们努力为全国自考考生编撰整理了全专业的自考练习题库,提供浙江甚至全国所有院校专业的在线题库练习和自考课程。该小程序免费练习,不需要安装,每个自考学员都可免费使用,并且在线自考课程仅售¥38元/科。

相关文章推荐