电大开放教育C语言程序设计课程期末复习考试题库小抄

上传人:痛*** 文档编号:41290768 上传时间:2021-11-19 格式:DOC 页数:7 大小:70KB
收藏 版权申诉 举报 下载
电大开放教育C语言程序设计课程期末复习考试题库小抄_第1页
第1页 / 共7页
电大开放教育C语言程序设计课程期末复习考试题库小抄_第2页
第2页 / 共7页
电大开放教育C语言程序设计课程期末复习考试题库小抄_第3页
第3页 / 共7页
资源描述:

《电大开放教育C语言程序设计课程期末复习考试题库小抄》由会员分享,可在线阅读,更多相关《电大开放教育C语言程序设计课程期末复习考试题库小抄(7页珍藏版)》请在装配图网上搜索。

1、最新电大C语言程序设计课程期末复习考试题库小抄 一、单选题 1在每个C语言程序中都必须包含有这样一个函数,该函数的函数名为( )。 A. main B. MAIN C. name D. function 2每个C语言程序文件的编译错误分为( )类。 A. 1 B. 2 C. 3 D. 4 3. 字符串"a+b=12n"的长度为( )。 A. 6 B. 7 C. 8 D. 9 4. 在switch语句的每个case块中,假定都是以break语句结束的,则此switch语句容易被改写为( )语句。 A. for B. if C. do D. while 5. 在下面的do-wh

2、ile循环语句中,其循环体语句被执行的次数为( )。 int i=0; do i+; while(i<10); A. 4 B. 3 C. 5 D. 10 6. 将两个字符串连接起来组成一个字符串时,选用的函数为( )。 A. strlen() B. strcap() C. strcat() D. strcmp() 7. 若用数组名作为函数调用的实参,传递给形参的是( )。 A. 数组的首地址 B. 数组中第一个元素的值 C. 数组中全部元素的值 D. 数组元素的个数 8. 假定a为一个整数类型的数组名,整数类型的长度为4,则元素a4的地址比a数组的首地址大( )个字节。 A. 4 B.

3、8 C. 16 D. 32 9. 假定s被定义为指针类型char *的变量,初始指向的字符串为"Hello world!",若要使变量p指向s所指向的字符串,则p应定义为( )。 A. char *p=s; B. char *p=&s; C. char *p;p=*s; D. char *p; p=&s; 10. 从一个数据文件中读入以换行符结束的一行字符串的函数为( )。 A. gets() B. fgets() C. getc() D. fgetc() 11. 由C语言目标文件连接而成的可执行文件的缺省扩展名为( )。 A. cpp B. exe C.

4、obj D. c 12. 设有两条语句为“int a=12; a+=a*a;”,则执行结束后,a的值为( )。 A. 12 B. 144 C. 156 D. 288 13. 带有随机函数调用的表达式rand()%20的值在( )区间内。 A. 119 B. 120 C. 019 D. 020 14. for循环语句“for(i=0; i<n; i+=2) S;”中循环体S语句被执行的次数为( )。 A. (n+1)/2 B. n/2+1 C. n/2-1 D. n-1 15. 在下列的字符数组定义中,存在语法错误的是( )。 A. char a20="abcdefg"

5、 B. char a="x+y=55." C. char a15='1','2' D. char a10='5' 16. 若有一个函数原型为“double *function()”,则它的返回值类型为( )。 A. 实数型 B. 实数指针型 C. 函数指针型 D. 数组型 17. 在C语言中,所有预处理命令都是以( )符号开头的。 A. * B. # C. & D. 18. 假定整数指针p所指数据单元的值为30,p+1所指数据单元的值为40,则执行*p+后,p所指数据单元的值为( )。 A. 40 B. 30 C. 7

6、0 D. 10 19. 若要使p指向二维整型数组a1020,则p的类型为( )。 A. int * B. int * C. int *20 D. int(*)20 20. 表示文件结束符的符号常量为( ) A. eof B. Eof C. EOF D. feof 21. 程序运行中需要从键盘上输入多于一个数据时,各数据之间默认使用( )符号作为分隔符。 A. 空格或逗号 B. 逗号或回车 C. 逗号或分号 D. 空格或回车 22. 逻辑表达式(x>0 && x<=10)的相反表达式为( )。A. x<=0 | x>10 B. x<=0 &&

7、amp; x>10C. x<=0 | x<=10 D. x>0 && x>10 23. 当处理特定问题时的循环次数已知时,通常采用( )循环来解决。 A. for B. while C. do-while D. switch 24. 假定i的初值为0,则在循环语句“while(i<n) s+=i*i; i+;”中循环体被执行的总次数为( )。 A. n-1 B. n C. n+1 D. n/2 25. 假定一个二维数组的定义语句为“int a34=3,4,2,8,6;”,则元素a12的值为( )。 A. 2 B. 4 C. 6 D. 8 26

8、. 在下列选项中,不正确的函数原型格式为( )。 A. int Function(int a); B.void Function (char); C. int Function(a); D.void int(double* a); 27. 假定p是一个指向float型数据的指针,则p+1所指数据的地址比p所指数据的地址大( )个字节。 A. 1 B. 2 C. 4 D. 8 28. 假定有定义为“int m=7, *p;”,则给p赋值的正确表达式为( )。 A. p=m B. p=&m C. *p=&m D. p=*m 29. 假定指针变量p定义为“int *p=malloc(

9、sizeof(int);”,要释放p所指向的动态存储空间,应调用的函数为( )。 A. free(p) B. delete(p) C. free(*p) D. free(&p) 30. C语言中的系统函数fopen()是( )一个数据文件的函数。 A. 读取 B. 写入 C. 关闭 D. 打开参考解答: 1. A 2. B 3. B 4. B 5. D 6. C 7. A 8. C 9. A 10. B 11. B 12. C 13. C 14. A 15. D 16. B 17. B 18. A 19. D 20. C 21. D 22. A 23. A 24. B 25. C 26

10、. C 27. C 28. B 29. A 30. D 二、填空题 1C语言中的每条简单语句以_;(或分号)作为结束符。 2. C程序中的所有预处理命令均以_#_字符开头。 3. 当不需要函数返回任何值时,则应使用void 标识符来定义函数类型。 4十进制数25表示成符合C语言规则的十六进制数为0x19 5. 假定不允许使用逻辑非操作符,则逻辑表达式a>b | b=5的相反表达式为a<=b && b!=5 6. 执行“typedef int DataType;”语句后,在使用int定义整型变量的地方也可以使用_ DataType _来定义整型变量。 7. 假定一维数

11、组的定义为“char* a8;”,则该数组所占存储空间的字节数为_32 _。 8. 假定二维数组的定义为“double aMN;”,则该数组的列下标的取值范围在_0N-1_之间。 9. 存储一个空字符串需要占用_1 _个字节。 10. strcpy函数用于把一个字符串_拷贝(复制)_到另一个字符数组空间中。 11. 程序的编译单位是一个_程序文件 _。 12. 假定a是一个一维数组,则ai的指针访问方式为_*(a+i)_。 13. 执行int *p=malloc(sizeof(int)操作得到的一个动态分配的整型对象为_*p _。 14执行“printf("%c",'

12、;A'+2);”语句后得到的输出结果为_ C _。 15short int类型的长度为_2 _。 16. 用类型关键字表示十进制常数3.26f的类型为_ float _。 17. 假定y=10,则表达式+y*3的值为_ 33_。 18. 逻辑表达式(x=0 && y>5)的相反表达式为_(x!=0 | y<=5) 或:(x | y<=5) _。 19若x=5,y=10,则x!=y的逻辑值为_1_。 20. 假定二维数组的定义为“int a35;”,则该数组所占存储空间的字节数为_60 _。 21. 使用“typedef char BB1050;”语句定

13、义_ BB _为含有10行50列的二维字符数组类型。 22. 字符串"a:xxk数据"的长度为_11_。 23假定p所指对象的值为25,p+1所指对象的值为46,则*+p的值为_46 _。 24. 假定一个数据对象为int*类型,则指向该对象的指针类型为_ int* _。 25假定一个结构类型的定义为 “struct Aint a,b; A* c;”,则该类型的长度为_12 _。 26. 假定要访问一个结构对象x中的数据成员a,则表示方式为_ x.a _。 27. 用于输出表达式值的标准输出函数的函数名是_ printf _。 28每个C语言程序文件在编译时可能出现有致命性

14、错误,其对应的标识符为_ error _。 29. 已知'A''Z'的ASCII码为6590,当执行“int x='C'+3;”语句后x的值为_70_。 30. 表达式(int)14.6的值为_14_。 31. 假定不允许使用逻辑非操作符,则关系表达式x+y>5的相反表达式为_ x+y<=5 32. 假定x=5,则执行“a=(x?10:20);”语句后a的值为_10 _。 33. 假定一维数组的定义为“char* aM;”,则该数组所占存储空间的字节数为_4*M _。 34. 存储字符串"a"需要至少占用存储器的_

15、2_个字节。 35. strlen()函数用于计算一个字符串的_长度_。 36. 在C语言中,一个函数由函数头和_函数体_这两个部分组成。 37假定p所指对象的值为25,p+1所指对象的值为46,则执行表达式*(p+)后,p所指对象的值为_46_。 38. 假定p是一个指向整数对象的指针,则用_&p _表示指针变量p的地址。 39. 与结构成员访问表达式p->name等价的访问表达式为_(*p).name _。参考解答:1. ;(或分号) 2. # 3. void 4. 0x195. a<=b && b!=5 6. DataType 7. 32 8. 0N-

16、19. 1 10. 拷贝(复制) 11. 程序文件 12. *(a+i)13. *p 14. C 15. 2 16. float17. 33 18. (x!=0 | y<=5) 或:(x | y<=5) 19. 1 20. 60 21. BB 22. 1123. 46 24. int* 25. 12 26. x.a27. printf 28. error 29. 70 30. 1431. x+y<=5 32. 10 33. 4*M 34. 235. 长度 360. 函数体 37. 46 38. &p39. (*p).name五、按题目要求编写程序或函数 1. 编写一个

17、程序,输出50以内(含50)的、能够被3或者5整除的所有整数。#include<stdio.h> void main() int i; for(i=3; i<=50; i+) if(i%3=0 | i%5=0) printf("%d ",i); printf("n"); 2. 编写一个递归函数“int FF(int a, int n)”,求出数组a中所有n个元素之积并返回。int FF(int a, int n) if(n<=0) printf("n值非法n"),exit(1); if(n=1) return

18、an-1; else return an-1*FF(a,n-1); 3. 编写一个程序,利用while循环,计算并打印输出的值,其中正整数n值由键盘输入。假定求和变量用sum表示,计数变量用i表示,sum、i和n均定义为全局变量,sum和i的初值分别被赋予0和1。#include<stdio.h> int n,i=1; double sum=0; void main() scanf("%d",&n); while(i<=n) sum+=(double)1/i+; printf("sum=%lfn",sum); 4. 根据函数原型

19、“void DD(int a, int n, int MM)”编写函数定义,利用双重循环查找并打印输出数组an中任何两个元素的值等于MM值的元素值。假定ai+aj等于MM,则输出格式为:(ai,aj)。void DD(int a, int n, int MM) int i,j; for(i=0; i<n; i+) for(j=i+1; j<n; j+) if(ai+aj=MM) printf("%d, %dn", ai,aj); 5. 编写一个程序,计算1+3+32+.+310的值并输出,假定分别用i,p,s作为循环变量、累乘变量和累加变量的标识符。#inclu

20、de<stdio.h> void main() int i; int p=1; int s=1; for(i=1;i<=10;i+) p*=3; s+=p; printf("%dn",s); 6. 根据函数原型“int FF(int a, int n)”,编写函数定义,计算并返回数组an中所有元素之和。int FF(int a, int n) int i,sum=0; for(i=0; i<n; i+) sum+=ai; return sum; 7. 根据函数原型“double Mean(double aMN,int m,int n)”,编写函数定义

21、,要求返回二维数组amn中所有元素的平均值。假定在计算过程中采用变量v存放累加值和最后的平均值。double Mean(double aMN,int m,int n) int i,j; double v=0.0; for(i=0; i<m; i+) for(j=0; j<n; j+) v+=aij; v/=m*n; return v; 注:函数体的最后两行可以合并为一条返回语句:return v/=m*n 8. 根据函数原型“int MM(int a,int m)”,编写函数定义,计算并返回数组am中元素最大值和最小值之差。int MM(int a,int m) int i,x1,

22、x2; x1=x2=a0; for(i=1; i<m; i+) if(ai>x1) x1=ai; if(ai<x2) x2=ai; return x1-x2; 请您删除一下内容,O(_)O谢谢!2016年中央电大期末复习考试小抄大全,电大期末考试必备小抄,电大考试必过小抄Acetylcholine is a neurotransmitter released from nerve endings (terminals) in both the peripheral and the central nervous systems. It is synthesized withi

23、n the nerve terminal from choline, taken up from the tissue fluid into the nerve ending by a specialized transport mechanism. The enzyme necessary for this synthesis is formed in the nerve cell body and passes down the axon to its end, carried in the axoplasmic flow, the slow movement of intracellul

24、ar substance (cytoplasm). Acetylcholine is stored in the nerve terminal, sequestered in small vesicles awaiting release. When a nerve action potential reaches and invades the nerve terminal, a shower of acetylcholine vesicles is released into the junction (synapse) between the nerve terminal and the

25、 effector cell which the nerve activates. This may be another nerve cell or a muscle or gland cell. Thus electrical signals are converted to chemical signals, allowing messages to be passed between nerve cells or between nerve cells and non-nerve cells. This process is termed chemical neurotransmiss

26、ion and was first demonstrated, for nerves to the heart, by the German pharmacologist Loewi in 1921. Chemical transmission involving acetylcholine is known as cholinergic. Acetylcholine acts as a transmitter between motor nerves and the fibres of skeletal muscle at all neuromuscular junctions. At th

27、is type of synapse, the nerve terminal is closely apposed to the cell membrane of a muscle fibre at the so-called motor end plate. On release, acetylcholine acts almost instantly, to cause a sequence of chemical and physical events (starting with depolarization of the motor endplate) which cause con

28、traction of the muscle fibre. This is exactly what is required for voluntary muscles in which a rapid response to a command is required. The action of acetylcholine is terminated rapidly, in around 10 milliseconds; an enzyme (cholinesterase) breaks the transmitter down into choline and an acetate io

29、n. The choline is then available for re-uptake into the nerve terminal. These same principles apply to cholinergic transmission at sites other than neuromuscular junctions, although the structure of the synapses differs. In the autonomic nervous system these include nerve-to-nerve synapses at the re

30、lay stations (ganglia) in both the sympathetic and the parasympathetic divisions, and the endings of parasympathetic nerve fibres on non-voluntary (smooth) muscle, the heart, and glandular cells; in response to activation of this nerve supply, smooth muscle contracts (notably in the gut), the freque

31、ncy of heart beat is slowed, and glands secrete. Acetylcholine is also an important transmitter at many sites in the brain at nerve-to-nerve synapses. To understand how acetylcholine brings about a variety of effects in different cells it is necessary to understand membrane receptors. In post-synapt

32、ic membranes (those of the cells on which the nerve fibres terminate) there are many different sorts of receptors and some are receptors for acetylcholine. These are protein molecules that react specifically with acetylcholine in a reversible fashion. It is the complex of receptor combined with acet

33、ylcholine which brings about a biophysical reaction, resulting in the response from the receptive cell. Two major types of acetylcholine receptors exist in the membranes of cells. The type in skeletal muscle is known as nicotinic; in glands, smooth muscle, and the heart they are muscarinic; and ther

34、e are some of each type in the brain. These terms are used because nicotine mimics the action of acetylcholine at nicotinic receptors, whereas muscarine, an alkaloid from the mushroom Amanita muscaria, mimics the action of acetylcholine at the muscarinic receptors. Acetylcholine is the neurotransmit

35、ter produced by neurons referred to as cholinergic neurons. In the peripheral nervous system acetylcholine plays a role in skeletal muscle movement, as well as in the regulation of smooth muscle and cardiac muscle. In the central nervous system acetylcholine is believed to be involved in learning, m

36、emory, and mood. Acetylcholine is synthesized from choline and acetyl coenzyme A through the action of the enzyme choline acetyltransferase and becomes packaged into membrane-bound vesicles . After the arrival of a nerve signal at the termination of an axon, the vesicles fuse with the cell

37、 membrane, causing the release of acetylcholine into the synaptic cleft . For the nerve signal to continue, acetylcholine must diffuse to another nearby neuron or muscle cell, where it will bind and activate a receptor protein. There are two main types of cholinergic receptors, n

38、icotinic and muscarinic. Nicotinic receptors are located at synapses between two neurons and at synapses between neurons and skeletal muscle cells. Upon activation a nicotinic receptor acts as a channel for the movement of ions into and out of the neuron, directly resulting in depolarization

39、60;of the neuron. Muscarinic receptors, located at the synapses of nerves with smooth or cardiac muscle, trigger a chain of chemical events referred to as signal transduction. For a cholinergic neuron to receive another impulse, acetylcholine must be released from the receptor to which it has bound.

40、 This will only happen if the concentration of acetylcholine in the synaptic cleft is very low. Low synaptic concentrations of acetylcholine can be maintained via a hydrolysis reaction catalyzed by the enzyme acetylcholinesterase. This enzyme hydrolyzes acetylcholine into acetic acid and choline. If

41、 acetylcholinesterase activity is inhibited, the synaptic concentration of acetylcholine will remain higher than normal. If this inhibition is irreversible, as in the case of exposure to many nerve gases and some pesticides, sweating, bronchial constriction, convulsions, paralysis, and possibly deat

42、h can occur. Although irreversible inhibition is dangerous, beneficial effects may be derived from transient (reversible) inhibition. Drugs that inhibit acetylcholinesterase in a reversible manner have been shown to improve memory in some people with Alzheimer's disease. abstract expressionism,

43、movement of abstract painting that emerged in New York City during the mid-1940s and attained singular prominence in American art in the following decade; also called action painting and the New York school. It was the first important school in American painting to declare its independence from Euro

44、pean styles and to influence the development of art abroad. Arshile Gorky first gave impetus to the movement. His paintings, derived at first from the art of Picasso, Miró, and surrealism, became more personally expressive. Jackson Pollock's turbulent yet elegant abstract paintings, which w

45、ere created by spattering paint on huge canvases placed on the floor, brought abstract expressionism before a hostile public. Willem de Kooning's first one-man show in 1948 established him as a highly influential artist. His intensely complicated abstract paintings of the 1940s were followed by

46、images of Woman, grotesque versions of buxom womanhood, which were virtually unparalleled in the sustained savagery of their execution. Painters such as Philip Guston and Franz Kline turned to the abstract late in the 1940s and soon developed strikingly original stylesthe former, lyrical and evocati

47、ve, the latter, forceful and boldly dramatic. Other important artists involved with the movement included Hans Hofmann, Robert Motherwell, and Mark Rothko; among other major abstract expressionists were such painters as Clyfford Still, Theodoros Stamos, Adolph Gottlieb, Helen Frankenthaler, Lee Kras

48、ner, and Esteban Vicente. Abstract expressionism presented a broad range of stylistic diversity within its largely, though not exclusively, nonrepresentational framework. For example, the expressive violence and activity in paintings by de Kooning or Pollock marked the opposite end of the pole from

49、the simple, quiescent images of Mark Rothko. Basic to most abstract expressionist painting were the attention paid to surface qualities, i.e., qualities of brushstroke and texture; the use of huge canvases; the adoption of an approach to space in which all parts of the canvas played an equally vital

50、 role in the total work; the harnessing of accidents that occurred during the process of painting; the glorification of the act of painting itself as a means of visual communication; and the attempt to transfer pure emotion directly onto the canvas. The movement had an inestimable influence on the m

51、any varieties of work that followed it, especially in the way its proponents used color and materials. Its essential energy transmitted an enduring excitement to the American art scene. Science and technology is quite a broad category, and it covers everything from studying the stars and the planets

52、 to studying molecules and viruses. Beginning with the Greeks and Hipparchus, continuing through Ptolemy, Copernicus and Galileo, and today with our work on the International Space Station, man continues to learn more and more about the heavens.  From here, we look inward to biochemistry and bi

53、ology. To truly understand biochemistry, scientists study and see the unseen by studying the chemistry of biological processes. This science, along with biophysics, aims to bring a better understanding of how bodies work from how we turn food into energy to how nerve impulses transmit. ana

54、lytic geometry, branch of geometry in which points are represented with respect to a coordinate system, such as Cartesian coordinates, and in which the approach to geometric problems is primarily algebraic. Its most common application is in the representation of equations involving tw

55、o or three variables as curves in two or three dimensions or surfaces in three dimensions. For example, the linear equation ax+by+c=0 represents a straight line in thexy-plane, and the linear equation ax+by+cz+d=0 represents a plane in space, where a, b, c, and dare constant

56、 numbers (coefficients). In this way a geometric problem can be translated into an algebraic problem and the methods of algebra brought to bear on its solution. Conversely, the solution of a problem in algebra, such as finding the roots of an equation or system of equations, can be estimated or some

57、times given exactly by geometric means, e.g., plotting curves and surfaces and determining points of intersection.  In plane analytic geometry a line is frequently described in terms of its slope, which expresses its inclination to the coordinate axes; technically, the slope m of a st

58、raight line is the (trigonometric) tangent of the angle it makes with the x-axis. If the line is parallel to the x-axis, its slope is zero. Two or more lines with equal slopes are parallel to one another. In general, the slope of the line through the points (x1, y1) and (x2, y2) is given by m= (y2-y1) / (x2-x1). The conic sections are treated in analytic geometry as the curves corresponding to the general quadratic equation ax2+bxy+cy2+dx+ey+f=0, where a, b, f are constants and a, b, and c are not all zero. In solid a

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!