首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下选项中,没有编译错误的是
以下选项中,没有编译错误的是
admin
2020-11-23
20
问题
以下选项中,没有编译错误的是
选项
A、charstr3[]={’d’,’e’,;b’,’u’,’g’,’\0’};
B、char str1[5]="pass",str2[6];str2=str1;
C、char name[10];name="china";
D、char str4[];str4="hello world";
答案
A
解析
选项A)是定义了字符数组str3[],并对其赋初值。选项B)中语句str2=str1非法,字符数组不能直接赋值。选项C),D)和选项B)一致。
转载请注明原文地址:https://kaotiyun.com/show/f03p777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
使用VC++2010打开考生文件夹下modi1中的解决方案。此解决方案的项目中包含一个源程序文件modi1.c。在此程序中,函数fun的功能是:将长整型数中各位上为奇数的数依次取出,构成一个新数放在t中。高位仍在高位,低位仍在低位。例如,当s中的数为87
下列给定程序的功能是:读入一个整数k(2≤k≤10000),输出它的所有质因子(即所有为素数的因子)。例如,若输入整数2310,则应输出:2,3,5,7,11。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增
下列给定程序中,函数fun的功能是:依次取出字符串中所有的数字字符,形成新的字符串,并取代原字符串。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构!试题程序:#include<stdl
下列选项中不属于结构化程序设计原则的是()。
以下叙述中正确的是()。
程序流程图中带有箭头的线段表示的是
下列关于数据库设计的叙述中,正确的是
if句的基本形式是:if(表达式)语句,以下关于“表达式”值的叙述中正确的是()。
某二叉树共有12个结点,其中叶子结点只有1个。则该二叉树的深度为(根结点在第1层)
在关系运算中,查找满足一定条件的元组,相关的运算称为()。
随机试题
原发型肺结核的好发部位有
A.普罗帕酮B.氯苯那敏C.丙氧酚D.丙胺卡因E.哌西那朵对映异构体之间产生强弱不同的药理活性的是()。
施工控制网一般采用建筑方格网,对于建筑方格的首级控制技术要求应符合《工程测量规范》的要求,其主要技术要求为()。[2013年真题]
纳税人兼营免税、减税项目的,应当分别核算免税、减税项目的销售额;未分别核算销售额的,统一按减税项目计算纳税。()
下列各项预算编制方法中,不受现有费用项目和现行预算束缚的是()。
A注册会计师负责对甲公司2011年度财务报表进行审计。在计划审计工作时,遇到下列事项,请代为作出正确的专业判断。在制定具体审计计划时,A注册会计师应当考虑的内容是()。
创造性思维验证期的主要特点是()
在今天的中国,最受瞩目的“成功”便是“有钱”,有钱的人总是想让别人相信,他们是因个人优秀才成为事业成功人士的。许多有钱人确实很有“才能”:聪明、能干、努力工作、吃苦耐劳。但是,有研究发现:聪明、能干,在事业成功中最多只起到10%的作用;而最努力工作、吃苦耐
牙齿磨耗程度取决于除外()。
A、 B、 C、 D、 B
最新回复
(
0
)