-
有以下程序#include <stdio.h>#include <string.h>void fun(char *str){ char temp;int n,i;n=strlen(str);temp=str[n-1];for(i=n-1;i>0;i--) str[i]=str[i-1];str[0]=temp;}main(){ char s[50];scanf("%s",s); fun(s); printf("%s\n",s);}程序运行后输入:abcdef<回车>,则输出结果是 。
-
有以下程序#include <stdio.h>#include <string.h>void fun(char *str){ char temp;int n,i;n=strlen(str);temp=str[n-1];for(i=n-1;i>0;i--) str[i]=str[i-1];str[0]=temp;}main(){ char s[50];scanf("%s",s); fun(s); printf("%s",s);}程序运行后输入:abcdef<回车>,则输出结果是 。
-
以下程序的输出结果是#include<stdio.h>int main(void) { char ch[3][4]={"123","456","78"}; int i; for(i=0;i<3;i++) printf("%s",ch[i]); return 0; }
-
程序输出的结果是( ) 。 #include <stdio.h> main( ) { char str[ ]="1a2b3c"; int i; for(i=0;str[i]!='\0';i++) if(str[i]<'0' || str[i]>'9') printf("%c",str[i]); printf(""); }选项: A:123456789 B:1a2b3c C:abc D:123
-
以下程序输出的结果是_.#include main(){char str[]="1a2b3c";int i;for(i=0;str[i]!='\0';i++)if(str[i]'9')printf("%c",str[i]);printf("\n");}
-
以下程序的输出结果是()。#include <stdio.h>int main(){char str[100]="ABCDEFG", *p=str;int i;for(i = 0; *p != ’ ’; p++,i++);printf("%d ",i);return 0;}
-
以下程序输出的结果是_________ 。 #include [stdio.h] main( ) { char str[ ]="1a2b3c"; int i; for(i=0;str[i]!='\0';i++) if(str[i]['0' || str[i]]'9') printf("%c",str[i]); printf("\n"); }[/i][/i][/i][/i]
-
有程序: #include "stdio.h" int main() { int i=0,j; char str1[20]="Hello,"; char str2[20]="the world."; while(str1[i]!='\0') i++; for(j=0;str2[j]!='\0';j++,i++) str1[i]=str2[j]; printf("%s\n",str1); return } 程序运行后的输出结果是( )[/i][/i] 选项: A、Hello, B、the world. C、Hello,the world. D、the world.Hello,
-
下面程序的运行结果是 #include <iostream.h>#include <string.h >void main(){ int i;char str[20]= "this is a book";cout<<str<< endl;for(i= 0;i<strlen(str);i++)if (str[i]>='a'&& str[i]<='z') str[i]-=32;cout<< str<< endl ;}
-
以下程序的输出结果是( )。#include <stdio.h>int main(){ char str[100]="ABCDEFG", *p=str; int i; for(i = 0; *p != ’’; p++,i++); printf("%d",i); return 0;}