填空题
在深度为7的满二叉树中,度为2的结点个数为()。
【参考答案】
63或2
6
-1
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序: #include <iostream> using namespace std; class Sample { friend long fun(Sample s); public: Sample(long a) {x=a;} private: long x; }; long fun(Sample s) { if(s.x < 2) return 1; return s.x * fun(Sample(s.x-1)); } int main() { int stun = 0; for (int i=0; i<6; i++) {sum += fun(Sample(i));} cout << sum; return 0; } 运行时输出的结果是()。
A.120
B.16
C.154
D.34
点击查看答案&解析
单项选择题
有如下程序: #include <iostream> using namespace std; int main() { char str[100], *p; cout<< Please input a string: ; cin>>str; p=str; for (int i=0; *p!=’ 0’; p++,i++); cout<<i<<endl; return 0; } 运行这个程序时,若输入字符串为 abcdefgabcd则输出结果是()。
A.7
B.12
C.13
D.100
点击查看答案&解析
相关试题
若将一个二元运算符重载为类的成员函数,其...
有如下程序: 这个程序的输出结果是()。
C++语言中的多态性分为编译时的多态性和...
有如下程序: 这个程序的输出结果是()。
用来派生新类的类称为(),而派生出的新类...