首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面程序的输出结果为( )。 #include<iostream.h> class CStatic { public: CStatic(){val++;} stati
下面程序的输出结果为( )。 #include<iostream.h> class CStatic { public: CStatic(){val++;} stati
admin
2009-02-15
45
问题
下面程序的输出结果为( )。 #include<iostream.h> class CStatic { public: CStatic(){val++;} static int val; }; int CStatic::val=0; void main() { CSatic cs1; cout<<cs1.val<<""; CStatic cs2; CStatic cs3,cs4; cout<<cs2.val<<endl; }
选项
A、14
B、24
C、34
D、54
答案
1
解析
转载请注明原文地址:https://kaotiyun.com/show/iKkp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有以下程序:#include<stdio.h>main(){printf("%d\n",NULL);}程序运行后的输出结果是()。
有以下程序#include<stdio.h>voidfun(int*x,ints,inte){inti,j,t;for(i=s,j=e;i<j;i++,j--)
有以下程序:#include<stdio.h>main(){inta[4][4]={{1,4,3,2},{8,6,5,7},{3,7,2,5},{4,8,6,1}},i,k,t;for(i=0;i<3;i++)for(k=i+1;k<4;k+
函数fun的功能是在a所指的具有n个元素的数组中查找最大值并返回给调用函数,函数不完整。intfun(int*a,intn){int*p,*s;for(p=a,s=a;p-a<n;p++)if(________
有三个关系R、S和T如下:则由关系R和S得到关系T的操作是( )。
己知下列函数定义:fun(int*intc,intamintdata){intk;for(k=0;k<m*n;k++){*b=data;b++;}}则调用此函数的正确写
有以下程序(其中库函数strstr()首部格式为:char*strstr(char*p1,char*p2)其功能是确定p2字符串是否在p1中出现,并返回p2第一次出现的字符串首地址)#include<stdio.h>#include<st
随机试题
子宫内膜癌首选的治疗方法是()
临床用于治疗消化性溃疡,属于奥美拉唑(–)–(S)–异构体的药物是()。
以下做法不符合相关法律规定的是()
下列倒装句中属于定语后置的一项是()。
在教学中,通过学生观察所学事物或教师语言的形象描述,引导学生形成所学事物、过程的清晰表象,丰富他们的感性认识,从而使他们能够正确地理解书本知识和发展认知能力。这体现的教学原则是()
在CPU中,常用来为ALU执行算术逻辑运算提供数据并暂存运算结果的寄存器是_______。
Awebcamisadigitalcamerathatsendsvideoimagestoothercomputerusers.It’saboutthe【C1】______ofagolfballandtyp
Theoriginsofbottledwatercanbe【B1】______backtotheearliest【B2】______.Wellawareofwater’shealthfacts,theRomansse
Theproblemofhowhealth-careresourcesshouldbeallocatedorapportioned,sothattheyaredistributedinboththemostjust
CanTonyBlairSavetheWorldofBooks?[A]AtthebeginningofAJourney,TonyBlairboaststhathehas"thesoulofarebel".
最新回复
(
0
)