[自考类试卷]全国自考(高级语言程序设计)模拟试卷19及答案与解析.doc

上传人:diecharacter305 文档编号:916418 上传时间:2019-02-28 格式:DOC 页数:14 大小:44.50KB
下载 相关 举报
[自考类试卷]全国自考(高级语言程序设计)模拟试卷19及答案与解析.doc_第1页
第1页 / 共14页
[自考类试卷]全国自考(高级语言程序设计)模拟试卷19及答案与解析.doc_第2页
第2页 / 共14页
[自考类试卷]全国自考(高级语言程序设计)模拟试卷19及答案与解析.doc_第3页
第3页 / 共14页
[自考类试卷]全国自考(高级语言程序设计)模拟试卷19及答案与解析.doc_第4页
第4页 / 共14页
[自考类试卷]全国自考(高级语言程序设计)模拟试卷19及答案与解析.doc_第5页
第5页 / 共14页
点击查看更多>>
资源描述

1、全国自考(高级语言程序设计)模拟试卷 19 及答案与解析一、单项选择题1 以下叙述中错误的是( )(A)使用三种基本结构构成的程序只能解决一些简单的问题(B)结构化程序设计提倡模块化(C) C 语言是结构化程序设计语言(D)结构化程序的基本结构为顺序、选择、循环2 现有定义 int a;double b;f1oat c;char k;则表达式 a/b +c-k 的值的类型为( )(A)int(B) f1oat(C) double(D)char3 当整型变量 c 的值不为 2,4,6 时,值也为“ 真 ”的表达式是( )(A)(c=2)|(c=4)|(c=6)(B) (c=2&c=2&c=2&c

2、main() int x;scanf(“df“,&x);if(xmain()int a22=1,2,3,4 ,*p,i;p=&a00;for(i=0;imain() char b = “CDEFGH“ ;char * chp = &b4 ;while( - - chp main() int i,a20,sum,count;sum=count=0;for(_)scanf(“ d“,&ai);/*第一空*/for(i =0;1void cp(char *p,char *b) int i,k=0;while(*p)i=0;while(_)/*第一空*/bk=*p;k +;p+;i+ ;if( *p)

3、_;/*第二空*/_;/*第三空*/main() chara20, b20;gets(a);cp(a, b);puts(b);printf(“n“);32 以下程序由终端输入一个文件名,然后把从终端键盘输入的字符依次存放到该文件中,用“#”作为结束输入的标志。#include#includemain() FILE*fp;char ch,fname10;printf( “input the name of fijen“);gets(fname );if(fp=_)=NULL) printf(“cannot openn“);exit(0);/*第一空*/elseprintf(“enter data

4、n“);wlule(_)futc(_ ,fp );/* 第二、三空*/fc10se(fp );五、程序设计题33 设计一个程序,输入一个字符,判断它是数字、字母还是其他字符。34 输入一个 34 矩阵,求其中的最大元素。全国自考(高级语言程序设计)模拟试卷 19 答案与解析一、单项选择题1 【正确答案】 A【试题解析】 使用顺序、选择、循环三种基本结构构成的程序可以解决所有问题,而不是简单问题,所有 A 错误。2 【正确答案】 C【试题解析】 按照“就长不就短”的规则,double 长度最长,最后类型都转化为double。3 【正确答案】 B【试题解析】 “| ”只要有一个为真即为真,“&”要全真才为真。对于 B,满足表达式(c=2&c0sum+=ai31 【正确答案】 imain() char a;a= getchar();if(a=0&a=a&a=A&amain( ) int a3 4,i,j,d,b,max ;if( max ad b )printf(“最大元素是 d“ ,max) ;

展开阅读全文
相关资源
猜你喜欢
  • BS PD IEC TS 62763-2013_5284 Pilot function through a control pilot circuit using PWM (pulse width modulation) and a control pilot wire《通过控制导向线使用PWM (脉冲宽度调制) 的导向功能和控制导向线》.pdf BS PD IEC TS 62763-2013_5284 Pilot function through a control pilot circuit using PWM (pulse width modulation) and a control pilot wire《通过控制导向线使用PWM (脉冲宽度调制) 的导向功能和控制导向线》.pdf
  • BS ISO 8070-2007 Milk and milk products - Determination of calcium sodium potassium and magnesium contents - Atomic absorption spectrometric method《牛奶和奶制品 钙、钠、钾和镁含量的测定 原子吸.pdf BS ISO 8070-2007 Milk and milk products - Determination of calcium sodium potassium and magnesium contents - Atomic absorption spectrometric method《牛奶和奶制品 钙、钠、钾和镁含量的测定 原子吸.pdf
  • BS ISO 8082-1-2009 Self-propelled machinery for forestry - Laboratory tests and performance requirements for roll-over protective structures - General machines《林业用自推进机械 防倾.pdf BS ISO 8082-1-2009 Self-propelled machinery for forestry - Laboratory tests and performance requirements for roll-over protective structures - General machines《林业用自推进机械 防倾.pdf
  • BS ISO 8082-2-2011 Self-propelled machinery for forestry Laboratory tests and performance requirements for roll-over protective structures Machines having a rotating platf.pdf BS ISO 8082-2-2011 Self-propelled machinery for forestry Laboratory tests and performance requirements for roll-over protective structures Machines having a rotating platf.pdf
  • BS ISO 8083-2006 Machinery for forestry - Falling-object protective structures (FOPS) - Laboratory tests and performance requirements《林业机械 落体防护装置(FOPS) 实验室试验和性能要求》.pdf BS ISO 8083-2006 Machinery for forestry - Falling-object protective structures (FOPS) - Laboratory tests and performance requirements《林业机械 落体防护装置(FOPS) 实验室试验和性能要求》.pdf
  • BS ISO 8086-2004 Dairy plant - Hygiene conditions - General guidance on inspection and sampling procedures《乳品厂 卫生条件 检验和取样程序通用指南》.pdf BS ISO 8086-2004 Dairy plant - Hygiene conditions - General guidance on inspection and sampling procedures《乳品厂 卫生条件 检验和取样程序通用指南》.pdf
  • BS ISO 8096-2005 Rubber- or plastics-coated fabrics for water resistant clothing - Specification《雨衣用橡胶或塑料涂覆织物 规范》.pdf BS ISO 8096-2005 Rubber- or plastics-coated fabrics for water resistant clothing - Specification《雨衣用橡胶或塑料涂覆织物 规范》.pdf
  • BS ISO 8097-2001 Aircraft Minimum airworthiness requirements and test conditions for certified air cargo unit load devices《航空器 经认证的航空货运集装单元装置最低适航性要求和试验条件》.pdf BS ISO 8097-2001 Aircraft Minimum airworthiness requirements and test conditions for certified air cargo unit load devices《航空器 经认证的航空货运集装单元装置最低适航性要求和试验条件》.pdf
  • BS ISO 8114-1993 Textile machinery and accessories - Spindles for ring-spinning and doubling machines - List of equivalent terms《纺织机械和附件 环锭纺纱机和并线机用锭子 同义术语表》.pdf BS ISO 8114-1993 Textile machinery and accessories - Spindles for ring-spinning and doubling machines - List of equivalent terms《纺织机械和附件 环锭纺纱机和并线机用锭子 同义术语表》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 大学考试

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1