更多"下列程序的运行结果为 #include<iostream.h> v"的相关试题:
[单项选择]下面程序运行后的输出结果是 () 。#include #include void main( ){ char a[7] = "china"; int i, j; i = sizeof(a); j = strlen(a); printf("%d, %d/n", i, j);}
A. 5, 5
B. 6, 6
C. 7, 5
D. 7, 6
[单项选择]下面程序的运行结果为
#include
void main( )
char a=,'3';
switch(
[单项选择]以下程序的输出结果是
#include
void main( )
char c='Z';
cout < < c-25;
A. 97
B. Z
C. z-25
D. 2
[单项选择]执行下列程序段,结果是
#include
void main( )
int x=40;
char y='C';
int n;
n=(x&0xff)&&c(y> 'B');
cout < < n;
A. 0
B. 1
C. 2
D. 3
[单项选择]有以下程序:
#include <iostream.h>
#include
void main( ) double d= 123.456789;
cout<<setprecision(3)<<d<<",";
cout<<setprecision(4)<<d<<",";
cout<<setprecision(5 )<<d<<end1;程序执行后的输出结果是( )。
A. 123,123.4,123.45
B. 123,123.5,123.46
C. 123,123,123.4
D. 123.456789,123.456789,123.456789
[单项选择]有以下程序:#include <iostream.h>#include void main( ){ double d=
123.456789; cout<<setprecision(3)<<d<<",";
cout<<setprecision(4)<<d<<","; cout<<setprecision(5
)<<d<<end1;}程序执行后的输出结果是( )。
A. 123,123.4,123.45
B. 123,123.5,123.46
C. 123,123,123.4
D. 123.456789,123.456789,123.456789
[单项选择]下列程序的运行结果为
#include<iostream.h>
Void main( )
int a=2;
iht b=a+1;
cout <<a/b <<end1;
A. 0.66667
B. 0
C. 0.7
D. 0.66666666…
[单项选择]下面程序的运行结果是
#include<iostream.h>
void main( )
int i=1;
while(i<=8)
if ( ++i%3!=2)continue;
else cout<<i;
A. 25
B. 36
C. 258
D. 369
[单项选择]下列程序的运行结果为
#include<iostream.h>
void main( )
int a=2;
int b=a+1;
cout << a/b << endl;
A. 0.66667
B. 0
C. 0.7
D. 0.66666666…
[单项选择]下面程序的运行结果为
# include <iostream.h>
void main( )
for(int a = 0,x =0;! x&&a < = 10;a++)
a++;
cout << a << endl;
A. 10
B. 11
C. 12
D. 0
[单项选择]下面程序的运行结果是
#include<iostream.h>
void main( 0
int num =1;
int &ref = num;
ref=ref+2;
cout << num;
num = num+3;
cout < < ref < < end1;
A. 13
B. 16
C. 36
D. 33