首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序的执行结果为 #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
50
问题
下列程序的执行结果为
#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>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
执行下面程序输出的是【】。#include<iostream>usingnamespacestd;template<typenameT>Ttotal(T*data){Ts=0;
有如下程序:#include<iostream>usingnamespacestd;classAA{intn;public:AA(intk):n(k){}intget(){ret
随机试题
女,36岁。因溃疡病大出血,输入库存血1500ml,发现呼吸深快,有烂苹果味,皮肤青紫,血压90/60mmHg,实验室检查血清钾7.1mmol/L,钠135mmol/L,动脉血pH7.2.血浆HCO3﹣17mmol/L。该病人电解质失衡诊断为(
画出线路方向过流保护原理接线图。
中国特色社会主义共同理想与共产主义远大理想的关系是什么?
Treesareusefultomaninthreeimportantways:theyprovidehimwithwoodandotherproducts;theygivehimshade;andtheyh
婴儿肠套叠的典型临床表现是()
人工肛门的护理方法正确的是
关于石油化工企业可燃气体放空管设置的说法,错误的是()。
A.肺癌B.乳腺癌C.结肠癌D.皮肤癌E.四肢肉瘤可经门脉系统转移至肝的肿瘤是
Morethananyotherindustry,America’smulti-billion-dollarentertainmentbusinessiscaughtinthecrossfireofthecountry’s
网络172.21.136.0/24和172.21.143.0/24汇聚后的地址是__________。(2010年下半年试题)
最新回复
(
0
)