填空题
在下面函数的画线处填上适当的内容,使该函数能够利用递归方法求解字符串str的长度(不得使用系统提供的字符串处理函数)。
int GetLen(char*str){
if(
(6)
)return
(7)
;
else return 1+GetLen(str+1);
{
【参考答案】
0
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
friend:Date
点击查看答案&解析
填空题
补充完整下面的类定义: const double PI=3.14; class Circle{ 圆形物体的抽象基类 protected: double r; 半径 public: Circle(double radius=0):r(radius){} (13) ; 计算圆形物体表面积的纯虚函数声明 }; class Cylinder:public Circle{ 圆柱体类 double h; 高度 public: Cylinder(double radius=0,double height=0); Circle(radius),h(height){} Virtual double Area( ){return 2*PI*r*(r+h);} 计算圆柱体的表面积 };
点击查看答案&解析
相关试题
空格
下列程序的输出结果为: Ohject id=0 ...
如下程序声明了一个使用两个通用数据类型的...
public A
Date