1、读下面的程序,写出输出结果include <iostream> using namespace std; class A { public: A(int i) {cout<<"constructing A "<<i<<endl;} }; class B { public: B(int j) {cout<<"constructing B "<<j<<endl;} }; class C: public A, public B { public: C(int a, int b, int c, int d): A(a), mB(d), mA(c),B(b) { } private: B mB; A mA; }; int main() { C obj(1,2,3,4); return 0; }
相似题目
-
写出程序的运行结果。 #include <stdio.h> main() { inta,b; scanf(”%d%d",&a,&b); if(++a>=b) printf(”Yes”); printf("a+b=%d\n",a+b); } 如果输入:a=6,b=8,则输出结果是()。
-
当执行下面的程序时,如果输入ABC,则输出结果是()。 #include "stdio.h" #include "string.h" main() { char ss[10]="12345"; gets(ss); strcat(ss,"6789"); printf("%s\n",ss); }
-
写出以下程序运行后的输出结果。 #includestdio.h #include string.h int main() { char st[20]={hello\0\t\\\}; printf(%d,%d\n,strlen(st),sizeof(st)); return 0; }
-
以下程序的输出结果是 。 #include main() { int m[ ]={1,4,7}; int i; for(i=1;i<=2;i++) printf(%d,m[i]); }
-
有以下程序#include #include main(){ char str[ ][20]={“One*World”, “One*Dream!”},*p=str[1];printf(“%d,”,strlen(p));printf(“%s ”,p);}程序运行后的输出结果是( )
-
写出以下程序的输出结果 ( ) 。 #include \stdio.h\ int i; int fun( int a, int *b); int main() { int i=1,j=2; fun (fun(i,&j),&j); return 0; } int fun ( int a, int *b) { static int m=2; i+=m+a; m =++(*b); printf (\%d,%d,\,i,m); return (m); }
-
有下列程序,程序运行后的输出结果是0( )。#include int main( ){int a[5]={1,2,3};printf(\%d \,a[3]);return 0;}
-
以下程序的输出结果是(44)。 include""void main(){ printf("%d\n",NULL);}A.不确定的值B.0C.-1
-
读下面的:includevoid main(){static int a[]={1,2,3,4,5};int *p=a;printf();printf();}写出运行的结果、
-
以下程序段的输出结果是[ ]。 include<iostream.h> void ref(int &i); void main(){int val=1
-
下列程序的输出结果是______。 include<stdio.h> main() { int a=2,b=-1,C=2;
-
要求下面的程序运行后,显示如下结果: 2 10 4 6 1 5 2 3 2 4 7 8 5 1 3 2 下列程序执行后的输出结果是________。 include void main(); }
-
下列程序的输出结果是()。 include<stdio.h> main() { int i,S=0; for(i=1;i<10;i++)
-
下列程序的输出结果是()。 include<stdio.h> main { int i; for(i=1;i<=10,i++) { if(
-
阅读以下程序,写出程序运行后的输出结果是 ______。include<iostream.h>void main(){char a[]={'
-
◑有以下程序◑include◑include◑main( )◑{char x[]=“STRING”;◑x[0]=0;x[1]=’\0’;x[2]=’0’;◑printf(”%d%d\n”,sizeof(x),strlen(x));◑}◑程序运行后的输出结果是( )。◑6 1◑7 0◑6 3◑7 1
-
写出下面程序执行后的运行结果。 include <stdio.h> define N 2 define M N+1 define N
-
以下程序的输出结果是() include<stdio.h> main() { int a,b; for(a=1,b=1,a<=50;a+ +)
-
下面的程序输出结果是()。include<iostream>using namespace std;void add(){static int x;x++;c
-
【简答题】分析下面的程序,写出程序的运行结果。 include <stdio.h> int main() { char c1='a',c2='b',c3='c',c4='110',c5; c5=c4+1; printf("a%c b%c c%ctabcn",c1,c2,c3); printf("%c %cn",c4,c5); return 0; }
-
写出程序的运行结果的第二行输出: 。 include <stdio.h> int main() { int X[4][4]={{11,2
-
阅读下面的C语言程序,请给出正确的输出结果()。include<stdio.h>define N 10define s(x) x*xdefine f(x) (x*x)define g(x) ((x)*(x))main(){ int i1, i2, i3, i4; i1=1000/s(N); i2=1000/f(N);i3=f(N+1);i4=g(N+1);printf(“i
-
运行程序输入hello↙和world↙,写出输出结果。 include <stdio.h>
-
有以下程序include <stdio.h>main){ ina=-1b=-1;for(a;)++b;printf("%d,%"ab);}程序运行后的输出结果是()
推荐题目
- 日常生活中,人们经常有这样的谈论,“某人讲不讲信用”。这里的信用,主要是从道德范畴,讲一个人诚实守信的品质。那么请问在经济学范畴,“信用”应该指什么?
- 简述什么是综合计划
- 何谓共生关系?请举一例说明真菌与植物间的共生关系。
- 在工程开工前,对利用的原始基准点、基准线等测量控制点,应由()复核。
- 电缆竖井和电缆沟应做()防火隔离,对敷设在隧道和厂房内构架上的电缆要采取()阻燃措施。
- 善治产后虚热和阴虚外感的药是()
- 投资者从信用账户转出资产受到的限制有()
- 男性,50岁,因高热3天,1天来休克于12月15日入院。BP40/0mmHg,眼结膜充血水肿。血WBC24×109/L,HB180g/L,尿蛋白(+++)下列治疗哪项不正确()
- 以下属于“五方交友”的益处的是()
- 大班幼儿已能较成熟进行自我服务 ()