更多"以下程序的结果是 #include<iostream.h> voi"的相关试题:
[单项选择]以下程序的结果是
#include<iostream.h>
void main( )
char * p="abcdefgh",* r;
long * q;
q=(long * )p;
q++;
r=(char * )q;
cout < < r < < end1;
A. defg
B. cdef
C. ghab
D. efgh
[单项选择]下列程序段的运行结果是( )。
#include<stdio.h>
void main( )
char str[]="ABC",*p=str;
printf("%d/n",*(p+3));
[单项选择]以下程序的输出结果是
#include
void main( )
char c='Z';
cout < < c-25;
A. 97
B. Z
C. z-25
D. 2
[单项选择]阅读以下程序 #include<iostream.h> void main( ) { charline[10]; in>>line; cout<<line<<endl; } 如运行时输入This is an example.<CR>,则程序的输出结果是( )。
A. This
B. This is
C. This is a
D. This is an exampl
[单项选择]有以下程序:
#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
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
void main( )
{
int a[10]={1,2,3,4,5,6,7,8,9,10}, *p=&a[3], *q=p+2;
printf("%d/n", *p + *q);
}
程序运行后的输出结果是( )。
A. 16
B. 10
C. 8
D. 6
[单项选择]以下程序的输出结果是 #include<iostream.h> void main( ) {int x=1,y=3; cout << x++ << ","; {int x=0;x+=y*2; cout <<X <<"," <<y << ","; } cout << x <<","<< y; }
A. 1,6,3,1,3
B. 1,6,3,6,3
C. 1,6,3,2,3
D. 1,7,3,2,3
[单项选择]以下程序的结果是( )。
#include<iostream.h>
void main( )
char*p="abcdefgh",*r;
long*q;
q=(1ong*)P;
q++;
r=(char*)q;
cout<<r<<endl;=
A. defg
B. cdef
C. ghab
D. efgh