2011年3月计算机二级C语言真题【附答案】

2008年9月全国计算机等级考试二级C语言笔试试卷及解析.doc 立即下载
2011年3月计算机等级考试二级C语言笔试

PDF版(非扫描)下载:  2011年3月计算机二级C语言真题

一、选择题
(1)下列关于栈叙述正确的是
A)栈顶元素最先能被删除B)栈顶元素最后才能被删除
C)栈底元素永远不能被删除D)以上三种说法都不对
(2)下列叙述中正确的是
A)有一个以上根结点的数据结构不一定是非线性结构
B)只有一个根结点的数据结构不一定是线性结构
C)循环链表是非线性结构
D)双向链表是非线性结构
(3)某二叉树共有7 个结点,其中叶子结点只有1 个,则该二叉树的深度为(假设根结点在第
1 层)
A)3 B)4 C)6 D)7
(4)在软件开发中,需求分析阶段产生的主要文档是
A)软件集成测试计划B)软件详细设计说明书
C)用户手册D)软件需求规格说明书
(5)结构化程序所要求的基本结构不包括
A)顺序结构B)GOTO 跳转C)选择(分支)结构D)重复(循环)结构
(6)下面描述中错误的是
A)系统总体结构图支持软件系统的详细设计
B)软件设计是将软件需求转换为软件表示的过程
C)数据结构与数据库设计是软件设计的任务之一
D)PAD 图是软件详细设计的表示工具
(7)负责数据库中查询操作的数据库语言是
A)数据定义语言B)数据管理语言C)数据操纵语言D)数据控制语言
(8)一个教师可讲授多门课程,一门课程可由多个教师讲授。则实体教师和课程间的联系是
A)1:1 联系B)1:m 联系
C)m:1 联系D)m:n 联系
(9)有三个关系R、S 和T 如下:

则由关系R 和S 得到关系T 的操作是
A)自然连接B)交C)除D)并
(10)定义无符号整数类为UInt,下面可以作为类UInt 实例化值的是
A)-369 B)369 C)0.369 D)整数集合{1,2,3,4,5}
(11)计算机高级语言程序的运行方法有编译执行和解释执行两种,以下叙述中正确的是
A)C 语言程序仅可以编译执行
B)C 语言程序仅可以解释执行
C)C 语言程序既可以编译执行又可以解释执行
D)以上说法都不对
(12)以下叙述中错误的是
A)C 语言的可执行程序是由一系列机器指令构成的
B)用C 语言编写的源程序不能直接在计算机上运行
C)通过编译得到的二进制目标程序需要连接才可以运行
D)在没有安装C 语言集成开发环境的机器上不能运行C 源程序生成的.exe 文件
(13)以下选项中不能用作C 程序合法常量的是
A)1,234 B)'123'
C)123 D)"\x7G"
(14)以下选项中可用作C 程序合法实数的是
A).1e0 B)3.0e0.2
C)E9 D)9.12E
(15)若有定义语句:int a=3,b=2,c=1;,以下选项中错误的赋值表达式是
A)a=(b=4)=3; B)a=b=c+1;
C)a=(b=4)+c; D)a=1+(b=c=4);
(16)有以下程序段
char name[20];
int num;
scanf("name=%s num=%d",name;&num);
当执行上述程序段,并从键盘输入:name=Lili num=1001<回车>后,name 的值为
A)Lili
B)name=Lili
C)Lili num=
D)name=Lili num=1001
(17)if 语句的基本形式是:if(表达式)语句,以下关于“表达式”值的叙述中正确的是
A)必须是逻辑值B)必须是整数值
C)必须是正数D)可以是任意合法的数值
(18)有以下程序
#include
main()
{ int x=011;
printf("%d\n",++x);
}
程序运行后的输出结果是
A)12 B)11 C)10 D)9
(19)有以下程序
#include
main()
2011年3月计算机二级C语言考试(试题及答案详解)12.pdf 立即下载

相关推荐

份计算机等级考试二级笔试真题及答案.doc

份计算机等级考试二级笔试真题及答案.doc

AI小智语音服务架构与嵌入式成本优化实践

语音交互系统是智能硬件的核心能力,其本质是端云协同的实时数据处理链路,涵盖音频采集、流式传输、语义理解与语音合成四大技术环节。原理上需严格划分物理层(确定性音频I/O)、协议层(WebSocket/Range可靠性通信)和语义层(ASR/LLM/TTS职责解耦),以保障低延迟与高可用。技术价值在于通过VAD前置过滤、分块下载、Token截断等嵌入式级优化,显著降低云端调用成本与网络开销。典型应用场景包括儿童故事机、智能音箱、教育机器人等对响应速度、音色自然度和单次交互成本敏感的AI小智设备。本文聚焦火山引擎

weixin_30653091的博客 357

2023最新版kali安装教程

2023最新版kali安装教程 打开kali官网(https://www.kali.org/),下载kali镜像

qq_46346209的博客 2万+

国产大模型编程能力深度分析报告(2026年5月更新版)

2026年5月国产大模型编程能力报告显示,主流模型迎来重大升级。DeepSeek V4以1.6T参数创性能新高,Qwen3.6-Plus支持原生多模态编程,MiniMax M2.7转向闭源并优化Agent编码,Kimi K2.6成为商业化成熟的主力模型,GLM-5开源并涨价30%。阿里云百炼推出双轨订阅体系,区分团队和个人开发者需求。各模型在参数规模、上下文长度、性能表现和适用场景上各具优势,国产AI编程服务正加速向订阅制转型,成本效益显著提升。

Willin Wang 的全栈升级指南 1723

从报错到优化:一次Gauss JDBC参数限制排查实录(32767参数上限避坑指南)

本文详细记录了排查GaussDB JDBC驱动因绑定参数数量超过32767上限而抛出`PSQLException`(报错信息为`Tried to send an out-of-range integer as a 2-byte value`)的全过程。文章深入分析了该限制的底层协议原理,并提供了应用层分批查询、使用临时表以及优化业务逻辑等多种解决方案,旨在帮助开发者规避此参数上限陷阱,构建更稳健的数据访问层。

rgv23456789的博客 225

【002】C++ 语言核心:关键字深度解析与分类指南

auto:自动类型推导bool:布尔类型break:跳出循环或switch语句case:switch语句分支char:字符类型class:定义类const:常量continue:结束当前循环,开始下一次循环default:switch语句默认分支delete:删除对象do:do-while循环double:双精度浮点数类型else:if语句的否定分支enum:枚举类型explicit:显式构造函数export:导出符号extern:声明外部变量或函数。

Lion_Long的博客 1254

116、影像质量主观评价方法论:标准场景与专家判读

本文探讨了影像质量主观评价的方法论,强调标准场景构建和专家判读体系的重要性。作者基于15年行业经验指出,仅靠客观指标无法保证观感质量,提出四类标准场景(灰阶、肤色、纹理、动态)的构建原则和四种专家判读维度(通透性、干净度、自然感、流程化)。文章揭示了主观评价中的常见误区,包括光源单一性、个人判读偏差、显示设备影响等,并建议建立多专家交叉验证机制和主观评价数据库。最后强调主观评价是可标准化的专业技术,需要将人眼感知转化为可追溯的技术参数。

sundong_81的博客 43

智能合约监控告警:提示工程架构师用AI Prompt实现精准预警

当AI大模型(尤其是代码理解模型如CodeLlama、GPT-4 Code)与区块链数据结合,智能合约监控迎来范式革新。AI模型如何精准理解智能合约的业务特殊性?如何避免"AI幻觉"导致的误报?如何让模型学会区分"正常异常"与"攻击前兆"?答案藏在"提示工程"(Prompt Engineering)中。理解特定智能合约的业务逻辑(如DeFi协议的清算机制、NFT的铸造规则)识别复杂的攻击模式(如重入攻击的调用链特征、闪电贷的套利路径)结合链上链下数据进行多维度推理(如关联价格波动与异常交易)

AI架构全栈开发实战笔记 1016

YOLOv8自定义训练:车牌识别全流程(从标注到推理,附可视化代码)

车牌检测全流程实践指南 摘要:本文详细介绍了基于YOLOv8的车牌检测完整实现方案。针对车牌检测中的三大难点(小目标、多角度、光照变化),提供了从数据准备到模型部署的全流程解决方案。重点包括:1)数据采集与标注规范;2)针对小目标的YOLOv8模型优化配置;3)K-means锚框聚类方法;4)训练参数调优策略。通过实际验证,该方法可获得95%以上的检测准确率,并附有完整的代码实现和可视化工具,便于开发者快速复现应用。 (字数:149字)

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 855

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 2010年9月计算机二级C语言真题答案
下一篇: 揭秘】计算机二级考试的评分原理说明了什么?
seven-soft
博客等级 码龄15年 604粉丝 979原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址