填空题

某二叉树中度为2的结点有18个,则该二叉树中有 【1】 个叶子结点。

【参考答案】

S
<上一题 目录 下一题>
热门 试题

单项选择题
有如下程序: #include<iostream.h> class Base { protected:int i; public:int j; }; class Derived:public Base { int m; public:int n; }; int main() { Derived d; d.i=0; [1] d.j=0; [2] d.m=0; [3] d.n=0; [4] return 0; } 其中主函数中有两个赋值语句有错,这两个错误的赋值语句是( )。
A.[1]和[2]
B.[1)和[3]
C.[2]和[3]
D.[2]和[4]
单项选择题
有如下程序 #include<iostream> using namespace std; class base { public: virtual void f1() { cout<< F1Base ; } virtual void f2() { cout<< F2Base ; } }; class derive:public base { void f1() { cout<< F1 Derive ; } void f2(int x) { cout<< F2 Derive ; } }; int main() { base obj1,*p; derive obj2; p=& obj2; p->f1(); p->f2(); return (); ) 执行后的输出结果是( )。
A.F1Derive F2Base
B.F1Derive F2Derive
C.F1Base F2Base
D.F1Base F2Derive
相关试题
  • 下面程序的输出结果是 【15】 。#incl...
  • 若已定义,以下fun函数的功能是:在第一个...
  • 若有:int i=1000;int *ip=&i;...
  • 以下程序的执行结果是 【14】 。#incl...
  • 下面程序的运行结果是 【13】 。#incl...