首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序的执行结果为 #include<iostream.h> void main( ) { int a=3,b=0; int * p=&a; b=+a++; cout < <
下列程序的执行结果为 #include<iostream.h> void main( ) { int a=3,b=0; int * p=&a; b=+a++; cout < <
admin
2013-05-30
46
问题
下列程序的执行结果为
#include<iostream.h>
void main( )
{
int a=3,b=0;
int * p=&a;
b=+a++;
cout < < * p < < "," < < b < < endl;
}
选项
A、3,4
B、4,3
C、3,4
D、4,4
答案
B
解析
* p为所指对象a的值,语句“b=+a++;”等价于“b=b+a; a=a+1;”。
转载请注明原文地址:https://kaotiyun.com/show/K1Np777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
结构化程序设计所规定的三种基本控制结构是()。
若要将一个模块的功能逐步分解,细化为一系列具体的步骤,进而用某种程序设计语言写成程序,应该在程序设计阶段采取【】和逐步求精的方法。
下面程序的输出结果是()。#include<iostream>usingnamespacestd;intfun(int,int);//fun()函数的说明voidmai
写出下列程序代码运行的结果【】。#include<iostream.h>classA{public:virtualvoiddisp(){cout<<"calssA!"<<(end
有如下程序#include<iostream.h>voidmain(){charch[2][5]={"6937","8254"},*p[2];inti,j,s=0;for(i=0;i<2;i++)p[i]=ch
对下列程序段的描述正确的是()。#include<iostream.h>intFun(int,int)voidmain(){cout<<Fun(5,50)<<endl;}intFun(i
随机试题
计算机显示器通常南两部分组成:监视器和___________。
Thereisnosmokewithoutfire.
关于施工作业质量控制点中,“见证点”和“待检点”的说法,错误的有()。
新加坡人偏爱()。
对于学习迁移现象最早的系统解释是()
17岁的某甲在外出打工,不慎将同事某乙的数码相机摔坏。此损失应由( )。
判别下列级数的敛散性:
有以下程序charfun(char*c){if(*c=’A’)*c=’A’-’a’;return*c;}main(){chars[81],*p=s;gets(s);whil
—Readthearticleontheoppositepageaboutidentifyingthetrainingneedsofstaff.—Inmostofthelines34-45thereiso
WhyGotoCanada?Huge,scenicandsparselypopulated,CanadawasratedbytheUnitedNationsHumanDevelopmentIndexasthe
最新回复
(
0
)