更多"以下程序执行后输出的结果是 【11】 。
#include<ios"的相关试题:
[单项选择]以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main ( ) { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y,int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }
A. 18
B. 9
C. 10
D. 不确定
[单项选择]以下程序执行后的输出结果是
#include<iostream>
using namcspace std;
void try(int,int,int,int);
int main( )
int x,y,z,r;
x=1;
y=2;
try(x,y,z,r);
cout<<r<<end1;
return 0;
void try(int x,int y, int z,int r)
z = x+y;
x = x*x;
y = y*y;
r = z+x+y;
A. 18
B. 9
C. 10
D. 不确定
[单项选择]以下程序执行后的输出结果是( )。
#include <iostream>
using namespace std;
void try(int,int,int,int);
int main ( )
int x,y,z,r;
x=1;
y=2;
try(x,y,z,r);
cout<<r<<end1;
return 0;
void try(int x,int y, int z,int r)
z = x+y;
x = X*X;
y = y*y;
r = z+x+y;
A. 18
B. 9
C. 10
D. 不确定
[单项选择]以下程序执行后的输出结果是( )。
#include <iostream>
using namespace std;
void try(int,int,int,int);
int main( )
int x,y,z,r;
x=1;
y=2;
try(x,y,z,r);
cout<<r<<endl;
return 0;
void try(int x,int y,int z,int r)
z=x+y;
x=x*x;
y=y*y;
r=z+x+y;
A. 18
B. 9
C. 不确定
[单项选择]以下程序执行后的输出结果是( )。
#include<iostream>
using namespace std;
void try(int,int,int,int);
int main( )
int x,y,z,r;
x=1;
y=2;
try(x,y,z,r);
cout<<r<<endl;
return 0;
void try(int x,int y, int z,int r)
z = x+y;
X = x*x;
y = y*y;
r = z+x+y;
A. 18
B. 9
C. 10
D. 不确定
[填空题]以下程序执行后输出的结果是 【11】 。
#include<iostream>
using namespace std;
int fac(int a,int b)
return(b-a)*a;
int main( )
int x=3,y=4,z=5,result;
result=fac(fac(x,y),fac(x,z));
cout<<result<<endl;
return 0;
[单项选择]以下程序输出结果是( ):
#include<iostream>
using namespace std;
void add(int x,int y,int *z)
*z=y+x;
int main( )
int a,b,c;
add(8,4,&a);
add(6,a,&b);
add(a,b,&c);
cout<<a<<","<<b<<","<<c<<end1;
return 0;
A. 12, 10, 14
B. 12, 18, 30
C. 12, 6, 18
D. 12, 14, 30
[单项选择]以下程序的输出结果是( )。
#include <iostream>
using namespace std;
int main( )
cout.fill('*');
cout.width(5);
cout<<hex<<100<<endl;
return 0;
A. **100
B. ***64
C. 100**
D. 64***
[单项选择]以下程序的输出结果是( )。
#include<iostream>
using namespace std;
void fun(char**q)
++q;
cout<<*q<<end1;
main( )
static char* s []= "HI","HELLO","TEST";
char**p;
p=s;
fun(p);
system("PAUSE");
return 0;
A. 为空
B. HI C) HELLO D) TEST
[填空题]以下程序的输出结果是 【9】 。
#include <iostream>
using namespace std;
void fun( )
static int a=0;
a+=2;
cout<<a;
int main( )
int CC;
for(CC=1;cc<4;CC++)
fun( );
cout<<end1;
return 0;
[填空题]以下程序的输出结果是 【6】 。
#include <iostream>
using namespace std;
int main( )
int s,i;
for(s=0,i=1;i<3;i++)
s+=i;
cout<<s<<end1;
return 0;