更多"现有如下程序段,此程序段编译有错误,则程序段的错误出在 #inclu"的相关试题:
[单项选择]现有如下程序段,此程序段编译有错误,则程序段的错误出在
#include<stdio.h>
main( )
int a=30,b=40,c=50,d;
d=a>30 b:c;
swish(d)
case a: Printf("%d,",
A. ;
B. ;
C. ;
D. 这个语句
[单项选择]现有如下程序段
#include"stdio.h"
main( )
int a[5][6]=23,3,65,21,6,78,28;5,67,25,435,76,8,22,45,7,8,34,6,78,32,4,5,67,4,21,1;
int i=0,j=5;
printf("%d/n",*(&a[0][0]+2*i+j-2));
则程序的输出结果为
A. 21
B. 78
C. 23
D. 28
[单项选择]下列程序段的运行结果是( )。
#include<stdio.h>
void main( )
char str[]="ABC",*p=str;
printf("%d/n",* (p+3));
[单项选择]设已执行预编译命令#include,以下程序段的输出结果是( )。
char s[]=“an apple”;
printf{“%d/n”,strlen(s)};
A. 7
B. 8
C. 9
D. 10
[单项选择]以下程序段的输出结果是 ______。
#include<iostream.h>
void main( )
char*p[5]="ABCD","EF","GHI","JKL","MNOP";
char **q=p;
int i;
for(i=0;i<=4;i++)
cout<<q[i];
A. ABCDEFGHIJKL
B. ABCD
C. ABCDEFGHIJKMNOP
D. AEGJM
[单项选择]设已执行预编译命令#include<string.h>,以下程序段的输出结果是( )。
char s[]=" an apple" ;
printf(" %d/n" ,strlen(s));
A. 7
B. 8
C. 9
D. 10
[单项选择]有如下程序段
&include<iostream.h>
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<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.h>
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
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