更多"下面程序的输出结果是( )。 char s( )='ABCD',*p"的相关试题:
[填空题]下面程序的输出结果是 【12】 。
char b[]="ABCD";
main( )
char b[30];
strcpy(&b[0],"GH");
strcpy(&b[1],"GH");
strcpy(&b[2],"GH");
printf("%s/n",b);
[填空题]下面程序的输出结果是 【12】 。
char b[]="ABCD";
main( )
char b[30];
strcpy(&b[0],"GH");
strcpy(&b[1],"GH”);
strcpy(&b[2],"GH");
printf("%s/n",B) ;
[单项选择]下面程序的输出结果是( )。
main( )
char *alpha[7]= "ABCD","EFGH","IJKL","MNOP","QRST","UVWX","YZ";
char **p;
int I:
p=alpha;
for(i=0;i<4;i++)
printf("%c",*(p[i]));
printf("/n");
A. AEIM
B. BFJN
C. ABCD
D. DHLP
[单项选择]下面程序的输出结果是( )。
#include <stdio.h>
char *p="abcdefghijklmnopq";
void main( )
int i=0;
while(*p++!='e');
printf("%c/n",*p);
A. c
B. d
C. e
D. f
[单项选择]以下程序运行后的输出结果是
main( )
char s[]="ABCD",*p;
for(p=s+1;p<s+4;p++)printf("%s/n",p);
A. ABCD
B. A
C. B
D. BCD
[填空题]以下程序的输出结果是 。
main( )
char s[]="ABCD",*p;
for(p=s+1;p<s+4;p++)printf("%s//n",p);
[单项选择]以下程序的输出结果是()。
main( )
char w[][10]="ABCD","EFGH","IJKL","MNOP"),K;
for(k=1;k<3;k++) printf("%s/n",w[k]);
A. ABCD
B. ABCD
C. EFG
D. EFGH
[填空题]当运行以下程序时,输入abcd,程序的输出结果是:______。
insert(char str[])
int i;
i=strlen(str);
while(i>0)
str[2*i]=str[i]; str[2*i-1]:’*’; i-;
printf("%s/n",str);
main( )
char str[40];
scanf("%s/n",str); insert(str);
[填空题]当运行以下程序时,输入abcd,程序的输出结果是:______。
insert(char str[])
int i;
i=strlen(str);
while(i>0)
str[2*i]=str[i];str[2*i-1]=’*’;i--;
printf("%s/n",str);
main( )
char str[40];
scanf("%s",str);insert(str);
[填空题]当运行以下程序时,输入abcd,程序的输出结果是: _________。
insert(char str[])
{ int i; i=strlen(str); while(i>0)
{ str[2*i]=str[i]; str[2*i-1]= ’’*’’; i--;}
printf("%s/n",str);
}
main( )
{ char str[40];
scanf("%s/n",str); insert(str);
}
[单项选择]下面程序输出的结果是( )
main( )
struct cmplx
int x;int y; cnum[2]=1,3,2,7;
printf("%d/n",cnum[0].y/cnum[0].x*cnum[1].x);
A. 0
B. 1
C. 3
D. 6
[单项选择]下面程序输出的结果是
#include<iostream.h>
void main( )
int i;
int a[3][3]=1,2,3,4,5,6,7,8,9;
for(i=0;<3;i++)
cout<<a[2-i][i]<<" ";
A. 1 5 9
B. 7 5 3
C. 3 5 7
D. 5 91
[单项选择]以下程序输出的结果为()。
main( )
char*alpha[6]="ABCD","EFGH","IJKL","MNOP","QRST","UVWX";
char**p;
int i;
p=alpha;
for(i=0,i<4;i++)
prntf("%s",p[i]);
A. ABCDEFGHIJKL
B. ABCD
C. ABCDEFGHIJKLMNOP
D. AEIM
[单项选择]下面程序输出的结果是( )。
#include<stdio.h>
main( )
char *a="1234";
fun(a);
printf("/n");
fun(char *s)
char t;
if(*s)
t=*S++;fun(s);
else return;
if(t!='/0')
putchar(t);
A. 1234
B. 4321
C. 1324
D. 4231
[单项选择]下面程序段的输出结果是
classTest
public static void main(Stringargs[])
MyThread t=new MyThread( );
t.displayOutput(”t has been createD) ”);
t.start( );
Class MyThread extends Thread
public void displayOutput(Strings)
System.out.println(S);
public void run( )
displayOutput(”t is running.”);
A. thas been created.
B. thas been created
C. t is running.
D. 编译出错
[填空题]下面程序的输出结果是 。
#include<iostream.h>
void main( )
{
int a[6] ={1,2,3,4,5,6};
for(int i=0;i<5;i++)
cout < < a[i] < <" ";
cout < < endl;