更多"对下述程序的判断中,正确的是( )。 #include<stdio"的相关试题:
[单项选择]有以下程序:
#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( )
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
void main( )
char a=,'3';
switch(
[单项选择]有如下程序段
#include
void main( )
int a=14,b=15,x;
char c='A';
x=(a&&b) &&(c<'B') ;
cout < < x;
执行该程序段后,x的值为
A. ture
B. false
C. 0
D. 1
[单项选择]下述程序段的执行结果是 ( )
#include<stdio.h>
void main( )
int x;
for(x=1; x<=100; x++)
if(++x%3==0)
if(++x%4==0)
if(++x%7==0)
printf("%d",x);
A. 75
B. 76
C. 77
D. 84
[单项选择]下述程序的输出结果是( )。
#include<stdio.h>
void main( )
int a[5]=2,4,6,8,10;
int *p=a,**q=&p;
printf("%d,",*(p++));
printf("%d",* *q);
A. 4,4
B. 2,2
C. 4,5
D. 2,4
[单项选择]下述程序段的执行结果是( )。
#include <stdio.h>
Void main( )
int x;
for(x=1;x<=100;x++)
if(++x%3==0)
if(++x%4==0)
if(++x%7==0)
printf("%d",x);
A. 75
B. 76
C. 77
D. 84
[单项选择]对下述程序的判断中,正确的是( )。
#include<stdio.h>
void main( )
char *P,s[256];
p=s;
while(strcmp(s,"the end"))
printf("Input the string:");
gets(s);
while(*P)
putchar(*p++);
A. 此程序循环接收字符串并输出,直到接收到字符串“the end”为止
B. 此程序循环接收字符串,接收到字符串“the end”则输出,否则程序终止
C. 此程序循环接收字符串并输出,直到接收字符串“the end”为止,但因为代码有错误,程序不能正常工作
D. 此程序循环接收字符串并将其连接在一起,直到接收字符串“the end”为止,输出连接在一起的字符串