首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
若有以下程序段 char str[4][12]={ "aa","bbb","ccccc","d" } , *strp[4]; int i; for( i = 0; i< 4; i++ ) strp[i] = str[i]; 不能正确引用字符串的选项是( )
若有以下程序段 char str[4][12]={ "aa","bbb","ccccc","d" } , *strp[4]; int i; for( i = 0; i< 4; i++ ) strp[i] = str[i]; 不能正确引用字符串的选项是( )
admin
2020-04-18
26
问题
若有以下程序段
char str[4][12]={ "aa","bbb","ccccc","d" } , *strp[4];
int i;
for( i = 0; i< 4; i++ ) strp
= str
;
不能正确引用字符串的选项是( )。
选项
A、strp
B、str[0]
C、strp[3]
D、*strp
答案
A
解析
在指针运算中,"*"为取值运算符,"&"为取地址运算符。表达式"p = NULL;"表示把空指针赋给指针变量p,而若要p指向变量x的地址需使用"p= &x;"的形式,所以答案选A)。
转载请注明原文地址:https://kaotiyun.com/show/ljCp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
在进行逻辑设计时,将E—R图中实体之间联系转换为关系数据库的()。
以下选项中,合法的数值型常量是()。
有下列程序#include<stdio.h>main(){charc,i;for(i=0;i<3;i++){c=getchar();printf(’’%c,’’,(c-’A’
以下非法的定义语句是()。
学生的记录由学号和成绩组成,N名学生的数据已放入主函数中的结构体数组S中。请编写函数fun,其功能是:把指定分数范围内的学生数据放在b所指的数组中,分数范围内的学生人数由函数值返回。例如,输入的分数是60、69,则应当把分数在60~69的学生数据
下列程序定义了N×N的二维数组,并在主函数中自动赋值。请编写函数fun(inta[][N]),该函数的功能是:将数组左下半三角元素中的值全部置成0。例如a数组中的值为:197238456则返回主程序后a数组中的值应为:097008000注
下列给定程序中函数fun的功能是:将长整型数中各位上为奇数的数依次取出,构成一个新数放在t中。高位仍在高位,低位仍在低位。例如,当s中的数为87653142时,t中的数为7531。请改正程序中的错误,使它能得出正确的结果。注意
设一棵完全二叉树共有700个节点,则此二叉树中的叶子节点数为()。
数据库设计的四个阶段是:需求分析、概念设计、逻辑设计和()。
下列数据流图(DFD)构造规则中正确的是()。
随机试题
一般认为麻风菌侵入另一个体最主要的途径包括
脊髓半侧损害(Brown—Sequard综合征)最常见于
某企业拟更新原设备,新旧设备的详细资料如下:假设企业最低报酬率为10%,企业适用所得税税率为25%,新、旧设备均按直线法计提折旧。请分析一下该企业应否更新。
班主任对一个班集体的发展起()。
简述晏阳初关于“四大教育”和“三大方式”教育主张的主要内容。
编写如下程序:PrivateSubCommand1_Click()Dima(3,3)AsIntegerDimiAsInteger,jAsIntegerFori=1To3Forj=
CarsAreGoodfortheEnvironmentBritain’smotorindustryisplanningamajorpublicitycampaigntocounterwhatitseesas
Thisbookprovidesyouwiththesimplebasicsforbeingphysicallyfit.【21】______yourageorpresentstateoffitness,you
Nowadays,manypeopleusecomputerstohandleordinaryissuessuchasbankingandofficework,andtospendtheirsparetimeon
A、Humansshouldstopdamagingtheenvironment.B、Theearthwillnotbesuitableforhumans.C、Theweatherreportseemstobemor
最新回复
(
0
)