填空题
下列函数的功能是判断字符串str是否对称,对称则返回true,否则返回false。请在横线处填上适当内容,实现该函数。
bool fun(char *str)
int i=0,j=0;
while(str[j]) j++;
for(j--;i<j && str[i]==str[j]; i++,j--);
return i______j;
【参考答案】
>=
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
有如下程序: #include<iostream> using namespace std; class PARENT public: PARENT()cout<< PARENT ;) ; class SON:public PARENT public: SON()cout<< SON ; ; int main() SON son; PARENT *p; p=&son; return 0; 执行上面程序的输出是______。
点击查看答案&解析
填空题
以下程序的输出结果是______。 #include<iostream.h> int add(int x, int y) return x+y; double add(double x, double y) return x+y; void main() int a=3, b=3; double c=6.5, d=1.5; cout<<add(a, b)<< , <<add(c, d)<<end1;
点击查看答案&解析
相关试题
有如下类声明: class MyClass int i;...
若下面程序运行时输出结果为: 1,A,1...