更多"请填写空格:
#include<iostream>
using"的相关试题:
[填空题]请填写空格:
#include<iostream>
using namespace std;
void fun(int x,int y,int * z)
*2 = x + y;
void main( )
int a=100,b=100,c,*p=&c;
fun(a,b,p);
【10】 ; //输出调用fun函数后返回a、b的和。
[单项选择]若有以下程序:
#include<iostream>
using namespace.std;
class data
public:
int x;
data(int x)
data::x=x;
);
class A
private:
data d1;
public:
A(int x) :dl(X)
void dispa( )
cout<<dl.X<<",";
;
class B:public A
private:
data d2;
public:
B(int x) : A(x-1),d2(x)
void dispb( )
cout<<d2.x<<endl;
;
class C://public B
public:
C(int x) :B(x-1)
void disp( )
dispa( );
dispb( );
;
int main( )
C obj(5);
obj.disp( );
return 0;
程序执行后的输出结果是
A. 5,5
B. 4,5
C. 3,4
D. 4,3
[填空题]#include<iostream>
using namespace std;
void main( )
int x=32,y=37;
const int*p=&x;
*p=y;
cout<<*P<<endl;
[填空题]有以下程序
#include <iostream >
using namespace std;
int main( )
{
int i=010,j=10;
cout<<(++i)<<","<<j--<<end1;
return 0;
}
则该程序运行后的输出结果是 【6】 。
[填空题]有如下程序:
#include <iostream>
using namespace std;
int strle(char a[],char b[])
{
int num=O,n=O;
while (* (a+num) !=’/0’)
num++;
while (b [n] )
{
* (a+num)=b [n];
num++;
n++;
}
return(num);
}
int main ( )
{
char strl[80],str2[80],*p1=str1,*p2=str2;
cin>>p1;
cin>>p2;
cout<<strle(p1,p2)<<end1;
return 0;
}
运行上述程序,如果从键盘输入字符串qwerty和字符串abcd,则程序的输出结果是 【7】 。