下面程序将输出computer,请填空。 #include <stdio.h> int main() {int i,j; char c[]="It's a computer"; for(i=0; i<=7;i++) { ; printf("%c",c[j]);} return 0; }
下面程序将输出computer,请填空。 #include <stdio.h> int main() {int i,j; char c[]="It's a computer"; for(i=0; i<=7;i++) { ; printf("%c",c[j]);} return 0; }
参考答案和解析
c[i]=c[i+7]
相关考题:
下面程序的运行结果是()。includevoid del(char*s){int i,j;char *a;a=s;for(i=0,j=0;a 下面程序的运行结果是( )。 #include<stdio.h> void del(char*s) { int i,j; char *a; a=s; for(i=0,j=0;a[i]!='\0';i++) { if(a[i]>='0'a[i]<='9') { s[j]=a[i]; j++; } s[j]='\0'; }} main() {char s[]="aa89gggh"; del(s); printf("\n%s",s); }A.aaB.89C.ggghD.aa89gggh
下面程序的运行结果是includevoid delch(char*s){int i,j;char *a;a=S;for(i=0,j=0;a[ 下面程序的运行结果是 #include<stdio.h> void delch(char *s) { int i,j; char *a; a=S; for(i=0,j=0;a[i]!='\0';i++) if(a[i]>='0' aa[i]<='9') {s[j]=a[i]; j++;} s[j]='\0';} main() { char *item="a34bC"; delch(item); printf("\A.abcB.34C.a34D.a34bc
下列程序的输出结果是()。inCludemain(){char ch[2][5]={"1234","5678,},*p[2];int i,j 下列程序的输出结果是( )。 #inClude<stdio.h> main() { char ch[2][5]={"1234","5678,},*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=p[i][j]-'0';A.8B.7C.12D.9
下列程序的运行结果为()。includevoidabc(char*str){int a,b,i,j;for(i=j=0;str[i]!='\ 下列程序的运行结果为( )。#include<stdio.h>voidabc(char*str){int a,b,i,j;for(i=j=0;str[i]!='\0';i++)if(str[i]!='a')str[j++]=str[j];str[j]='\0';}void main(){char Str[]="abcdef';abc(str);printf("str[]=%s",str);}A.str[]=bcdefB.str[]=abcdefC.str[]=aD.str[]=ab
下面程序的功能是:对字符串从小到大进行排序并输出,请填空。#include "string.h"#include "stdio.h"sort(char *a[],int n){ int i,j;char *p;for(j=1;j=n-1;j++)for(i=0; 【15】 ;i++)if( 【16】 0){ p=a[i];a[i]=a[i+1];a[i+1]=p;}}main(){ int i;char *book[]={"itisme","itisyou","howareyou","fine","goodnight","goodbye"};sort( 【17】 );for(i=0;i6;i++)printf("%s\n",book[i]);}
下面程序的输出结果为【】。 include main() { char a[]="morning",t; int i,j=0; for( 下面程序的输出结果为【 】。include<iostream.h>main(){char a[]="morning",t;int i,j=0;for(i=1;i<7;i++)if(a[j]<a[i])j=i;t=a[j];a[j]=a[7];a[7]=a[j];cout<<a;}
以下程序用以删除字符串中所有的空格,请填空。 include main() {char s[100]={"Our teac 以下程序用以删除字符串中所有的空格,请填空。include<stdio.h>main(){char s[100]={"Our teacher teach C language!"};int i,j;for(i=j=0;s[i]!='\0';i++)if(s[i]!=''){( )}s[j]='\0';printf("%s\n",s);}
有以下程序:includeincludemain() {char c[6];int i=0;for(;j 有以下程序:#include<stdio.h>#include<stdio.h>main() { char c[6]; int i=0; for(;j<6;c[i]=getchar(),i++); for(i=0;i<6;i++)putchar(c[i]); printf("\n");}如果从键盘上输入:ab<回车>c<回车>def<回车>则输出结果为 ______。A.a b c d e fB.a b c dC.ab c dD.abcdef
如下程序的输出结果是includemain(){chsr ch[2][5]={"6937","8254"},*p[2];int i,j,s= 如下程序的输出结果是 #include<stdio.h> main() { chsr 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.69825B.63825C.6385D.693825
已知C源程序如下: include include void reverse(char S[]){ int C,i,J; f 已知C源程序如下:include<stdio. h>include<string. h>void reverse(char S[]){int C,i,J;for(i=0,j=strlen(s)-1;i<j;i++,j++){c=s[i];s[i]=s[j];s[j]=c;}}void getHex(int number,char s[]){int I;i=0;while(number>0){if(number%16<10)s[i++]=number%16+'0';elseswitch(number%16){case 10:s[i++]='A';break;case 11:s[i++]='B';break;case 12:s[i++]='C';break;case 13:s[i++]='D';break;case 14:s[i++]='E';break;case 15:s[i++]='F';break;default:printf("Error");break;}number/=16;}s[i]:'\o';reverse(s);}int main(){unsigned int number;int i=0:char s[50];printf("%s","please input number;\n");scanf("%d",&number):getHex(number,s);i=0;while(s[i])printf("%c",s[i++]);return 0;}画出程序中所有函数的控制流程图。
下列程序的运行结果为()。includevoid abc(char*str){int a,b,i,j; for(i=j=0;str[i]!= 下列程序的运行结果为( )。 #include<stdio.h> void abc(char*str) { int a,b,i,j; for(i=j=0;str[i]!='\0';i++) if(str[i]!='a' str[j++]=str[i]; str[j]='\0'; } void main() { char str[]="abcdef"; abc(str); printf("str[]=%s",str); }A.str[]=bcdefB.str[]=abcdefC.str[]=aD.str[]=ab
有以下程序:include main( ) char * p[ ] = {"3697" ,"2548" }; int i,j;long num =0 有以下程序: #include <stdio.h> main( ) char * p[ ] = {"3697" ,"2548" }; int i,j; long num =0; for(i =0;i<2;i ++ ) { j =0; while(p[i][j]! ='\0') { if((p[i][j]-'0')%2) num=10*num+p[i][j]-'0'; j+ =2; } printf( "%d \n" ,num);}程序执行后的输出结果是( )。A.35B.37C.39D.3975
执行下面程序后输出的结果是()。include using namespace std;int main(){ int a[4][4 执行下面程序后输出的结果是( )。 #include <iostream> using namespace std; int main(){ int a[4][4]={{1,2,3,-4},{7,-12,-13,8},{-21,9,0,-24},{-31,10,-33,11}}; int i,j,s=0; for(i=0;i<4;i++){ for(j=0;j<4;j++){ if(a[i][j]>=0)continue; s+=a[i][j]; } } coat<<s<<endl; return 0; }A.141B.-138C.-1D.75
下面程序的运行结果是( )。 include main() {char a[80],*p="AbabCDcd"; int i=0,j=0; w 下面程序的运行结果是( )。 include<stdio.h> main() {char a[80],*p="AbabCDcd"; int i=0,j=0; while(*(p++)!='\0') {if(*p>='a'*p<='z'){a[i]=*p;i++;} } a[i]='\0'; puts(A); }
以下程序的输出结果是【 】。include int fun(int x) {static int t=0; return(t+=x); } 以下程序的输出结果是【 】。include <stdio.h>int fun(int x){ static int t=0;return(t+=x);}main()int s,i;for(i=1 ;i<=5;i++) s=fun(i);printf("%d\n",s);
有以下程序:include include main( ) {char a[ 7 ] = "a0 \0a0 \0";int i, 有以下程序:#include <stdio.h>#include <string.h>main( ) { char a[ 7 ] = "a0 \0a0 \0"; int i,j; i = sizeof(a); j = strlen(a); printf(" % d %d \n" ,i,j); }程序运行后的输出结果是( )。A.22B.76C.72D.62
有以下程序:includeincludevoid fun(char*s[],int n){char*t;int i,j;for( 有以下程序: #include<stdio.h> #include<string.h> void fun(char*s[],int n) { char*t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])){t=s[i];s[i]=s[j];s[j]=t;} } main() { Char*ss[]={"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5);printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc
下列程序的运行结果为()。 include voidabc(char*str) {int a,b,i,j; for(i=j=0;str[i] 下列程序的运行结果为( )。#include<stdio.h>voidabc(char*str){int a,b,i,j;for(i=j=0;str[i]!='\0';i++)if(str[i]!='a')str[j++]=str[j];str[j]='\0';}void main(){char Str[]="abcdef';abc(str);printf("str[]=%s",str);}A.str[]=bcdefB.str[]=abcdefC.str[]=aD.str[]=ab
有以下程序:include int f(int b[] [4]){int i,j,s=0; for(j=0;j2) 有以下程序: #include <stdio.h> int f(int b[] [4]) { int i,j,s=0; for(j=0;j<4;j++) { i=j; if(i>2) i=3-j; s+=b[i][j]; } return s; } main() { int a[4][4]={{1,2,3,4},{0,2,4,6},{3,6,9,12},{3,2,1,0}}; printf("%d\n",f(a)); } 执行后的输出结果是( )。A.12B.11C.18D.16
下列程序的输出结果是______。include main(){ int i=1,j=3; printf("%d,",i++); {int 下列程序的输出结果是______。#include <stdio.h>main (){ int i=1,j=3; printf("%d,",i++); { int i=0; i+=j*2; printf("%d,%d,",i,j); } printf("%d,%d\n",i,j);}A.1,6,3,1,3B.1,6,3,2,3C.1,6,3,6,3D.1,7,3,2,3
下面程序的运行结果是includemain(){char a[]="morning",t; int i,j=0; for(i=1;i 下面程序的运行结果是 #include<stdio.h> main() { char a[]="morning",t; int i,j=0; for(i=1;i<7;i++) if(a[j]<a[i])j=i; t=a[j]; a[j]=a[7]; a[7]=a[j]; puts[a];}A.mrgninrB.moC.moringD.morning
下列程序的输出结果是()。includemain() {char ch[2][5]={"1234","5678"},*p[2];int i, 下列程序的输出结果是( )。 #include<stdio.h> main() { char ch[2][5]={"1234","5678"},*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=p[i][j]-'0'; printf("%d",s);} }A.6357B.6135C.1357D.691357
有如下程序includevoid main(){char ch[2][5]={"6937","8254"},*p[2];int i,j,s=0; 有如下程序 #include<iostream.h> void 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'; cout<<s; return 0; } 该程序的输出结果是( )。A.69825B.63825C.6385D.693825
如下程序的输出结果是includemain(){ char ch[2)[5]={"6937","8254"},*p[2];int i,j,s 如下程序的输出结果是 #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.69825B.63825C.6385D.693825
下面程序的输出结果是( )。 #include "stdio.h" fun (x int x { int y=0; static int z=5; z=x++,y++; return(Z); } main() { int a=4,i,j; for(i=0;i<2;i++) j=fun(a++); printf("%d",j); }A.0B.3C.4D.5
下列程序的输出结果是()。 inClude main() {charch[2][5]={"1234","5678"},*p[2]; int 下列程序的输出结果是( )。#inClude<stdio.h>main(){ charch[2][5]={"1234","5678"},*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=p[i][j]-'0';printf("%d",s);}}A.6357B.6135C.1357D.691357
下面程序的运行结果是()。includevoid delch(char *s){ int i,j;char*a;a=s;for(i=0,j= 下面程序的运行结果是( )。 #include<stdio.h> void delch(char *s) { int i,j; char*a; a=s; for(i=0,j=0;a[i]!='\0' ;i++) if(a[i]>='0' a[i]<='9') { s[j]=a[i]; j++;} s[j]='\0'; } main() { char*item="a34bc"; delch(item); printf("\n%s" ,item);}A.abcB.34C.a34D.a34bc
单选题有以下程序:#include main(){ int i,j=0; char a[] = How are you,b[10]={0}; for(i=0;a[i];i++) if(a[i]==' ') b[j++]=a[i+1]; printf(%s,b);}程序运行后的输出结果是( )。AHayBHow are youCweDay