阅读下面程序:include <iostream.h>long fib(int n){if (n>2)return (fib(n-1) + fib(n-2));else
阅读下面程序:
include <iostream.h>
long fib(int n)
{
if (n>2)
return (fib(n-1) + fib(n-2));
else
return (2);
}
void main()
{
cout<<fib(3)<<end1;
}
则该程序的输出结果应该是【 】。
阅读下面程序:
include <iostream.h>
long fib(int n)
{
if (n>2)
return (fib(n-1) + fib(n-2));
else
return (2);
}
void main()
{
cout<<fib(3)<<end1;
}
则该程序的输出结果应该是【 】。
若有以下程序: #include <iost ream> using namespace std; class A { private: int a; public: A(int i) { a=i; } void disp () { cout<<a<<", "; } }; class B { private:
A.10,10,10
B.10,12,14
C.8,10,12
D.8,12,10
有如下程序: #include<iost earn> using namespace std; class TestClass{ protected: TestClass(){cout<<'x';} TestClass(char C) {cout<<c;} }; class TestClass1:public TestClass { public: TestClass1(char C) {Cout<<c;) }; int main(){ TestClass1 d1('y'); return 0; } 执行这个程序,屏幕上将显示输出()。
A.y
B.yx
C.xy
D.yy
阅读下面程序,则程序的执行结果为 【10】 。
#include "stdio.h"
main()
{ int a=10;
fun(a);
printf("%d\n",a);}
fun(int x)
{ x=50;}
阅读下面程序,则执行后的结果为_____ #include <stdio.h> int main() { char *str="abcdefghijklmnopq"; while(*str++!=′e′); printf("%c\n",*str); }
阅读下面程序,则执行后程序的结果为 【9】
#include "stdio.h"
main()
{ int a=0,b=0;
while(a <15)a++;
while(b++ <15);
printf("%d,%d\n",a,b);}
阅读下面程序,则执行后的结果为
#include "stdio.h"
main()
{ char *str="abcdefghijklmnopq";
while(*str++!=′e′);
printf("%c\n",*str);}
A.f
B.a
C.e
D.q
阅读下面程序: #include <iomanip. h> int main () { cout<<setfill('*' )<<setw(8 ); cout<<setprecision(5 )<<3.1415926<<end1; return 0; } 则该程序的输出结果是 ()。
A.3.1415**
B.***3.1416
C.3.141593
D.**3.14159
A.f
B.a
C.e
D.a
阅读下面程序,则程序的执行结果为【 】。 include"stdio.h" main() { int a=30,b=20,z; z=fun(a+b,a-b); printf("%d\n",z);} fun(int a,int b) { int z; z=a/b; return z;}
阅读下面程序,则程序的执行结果为()。 include"stdio.h" main() {int a=10; fun(A); printf("%d\n",A);} fun(int x) {x=50;}
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!