更多"若有以下程序: #include <iostream> using"的相关试题:
[单项选择]若有以下程序:
#include <iostream>
using namespace std;
void sub(int x,int y, int *z)
*Z = y+x;
int main( )
int a,b,c;
sub(8,4,&
A. ;
B. ;
C. ;
[单项选择]若有以下程序:
# include <iostream>
using namespace std;
void sub(int x, int y, int *z) *z = y+x;int main ( ) int a,b, c;
sub[8,4.&
A. ;
B. ;
C. ;
[单项选择]若有以下程序:#include <iostream>using namespace std;int f( ){ static int i = O; ints= 1; s+=i; i++; return s;}int main( ){ int i, a =0; for(i=0;i<5;i++) a+=f( ); cout<<a<<end1; return 0;}程序运行后,输出的结果是( )。
A. 20
B. 24
C. 25
D. 15
[单项选择]若有如下程序段:
#include<iostream>
using namespace std;
int main ( )
char*p="abcdefgh",*r;
r=p;
cout<<*r<<end1;
return 0;
该程序的输出结果是( )。
A. a
B. b
C. c
D. d
[单项选择]有以下程序
#include<iostream>
using namespace std;
class sample
private:
int x;
public:
sample(int
[单项选择]有以下程序: #include <iostream> using namespace std; int main ( ) { int x=15; while (x>10&&x<50) { x++; if (x/3) { x++; break; } } cout<<x<<endl; return 0; } 执行后的输出结果是
A. 15
B. 16
C. 17
D. 18
[单项选择]有以下程序:
#include <iostream>
using namespace std;
class sampleprivate:
int x;
static int y;
public:
sample(int
A. ;