更多"下列程序执行后的输出结果是 #include<string.h> "的相关试题:
[单项选择]下列程序执行后的输出结果是
#include<string.h>
main( )
char arr[2][4];
strcpy(arr, "you"); strcpy(arr[1], "me");
arr[0][3]='&';
cout<<arr<<endl;
A. you&me
B. you
C. me
D. err
[单项选择]阅读下面程序,则执行后的结果是
#include"stdio.h"
main( )
char str[]="tomeetme",*p;
for(p=str;p<str+7;p+=2)putchar(*p);
printf("/n"); .
A. tomeetme
B. tmem
C. oete
D. tome
[单项选择]下列程序的输出结果是______。
#include
main( )
char b[30],*chp;
strcpy(&b[0],"CH");
strcpy(6b[1],"DEF");
strcpy(6b[2],"ABC");
printf("%s/n",b);
A. CHDEF
B. DEFABC
C. CDABC
D. CHABC
[单项选择]以下程序的输出结果是 #include void main( )
{ char c='Z'; cout < < c-25;}
A. 97
B. Z
C. z-25
D. 2
[单项选择]如下程序的输出结果是 #include<stdio.h> main( ) { char ch[2)[5]={"6937","8254"},*p[2]; int i,j,s=0; for (i=0;i<2;i++) p[i]=ch[i]; for (i=0;i<2;i++) for(j=0;p[i][j]>'/0';j+=2) s=10*s+p[i][j]-'0'; printf("%d/n",s);}
A. 69825
B. 63825
C. 6385
D. 693825
[单项选择]下列程序执行后的输出结果是( )。
#include <stdio.h>
main( )
int a[3][3],*p,i;
p=&a[0][0];
for(i=1;i<9;i++) p[i]=i+1;
printf("%d/n",a[1][2]);
A. 3
B. 6
C. 9
D. 随机数
[单项选择]以下程序运行后的输出结果是 #include<stdio.h> main( ){ char s[]="rstuv"; printf("%c/n", *s+2); }
A. tuv
B. 字符t的ASCII码值
C. t
D. 出错
[单项选择]下面程序的输出结果是( )。 #include<stdio.h> main( ) {char a[]={'a','b','c','d','f','g'},*p; p=a; printf("%c/n",*p+4); }
A. a
B. b
C. e
D. f
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
char *a[]="abcd", "ef", "gh", "ijk"; int i;
for(i=0; i<4; i++) printf("%c", *a[i]);
A. aegi
B. dfhk
C. abcd
D. abcdefghijk
[单项选择]下面程序段执行后输出的结果是( ) #include<stdio.h> main( ) {int a[2][2]={{1,2),{5,7)),*P,i; p=&a[0][0]; for(i=0;i<2;i++) "P++=i+1: printf("%d",*(p-2)); }
A. 1
B. 2
C. 5
D. 7
[单项选择]以下程序运行后的输出结果是 #include #include
main( ) { char str[][20]={'One * World", "One *
Dream!"}, *p=str[1]; printf("%d,", strlen(p));
printf("%s/n", p); }
A. 9,One * World
B. 9,One * Dream
C. 10,One * Dream!
D. 10,One * World
[单项选择]以下程序的输出结果是()。 #include #include main() {charb1[8]="abcdefg",b2[8],*pb=b1+3; while(--pb>=b1)strcpy(b2,pb); printf("%d/n",strlen(b2)); }
A. 8
B. 3
C. 1
D. 7
[单项选择]下面程序的输出结果是 ______。#include<stdio.h>main( ){ char*p[]={"BOOL","OPK","H","SP"}; int i: for(i=3;i>=0;i-,i-) printf("%c",*p[i]); printf("/n");}
A. SO
B. SP
C. SPOPK
D. SHOB