网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
(31)有以下程序
#include <stdio.h>
main()
{ char a[30],b[30];
scanf("%s",a);
gets(b);
printf("%s\n %s\n",a,b);
}
程序运行时若输入:
how are you? I am fine<回车>
则输出结果是
A)how are you? B)how
I am fine are you? I am fine
C)how are you? I am fine D)row are you?
参考答案
更多 “ (31)有以下程序#include stdio.hmain(){ char a[30],b[30];scanf("%s",a);gets(b);printf("%s\n %s\n",a,b);}程序运行时若输入:how are you? I am fine回车则输出结果是A)how are you? B)howI am fine are you? I am fineC)how are you? I am fine D)row are you? ” 相关考题
考题
( 12 ) 有以下程序#include stdio.h#include string.hvoid fun ( char *str ){ char temp;int n,i;n=strlen ( str ) ;temp=str[n-1];for ( i=n-1;i0;i-- ) str[i]=str[i-1];str[0]=temp;}main (){ char s[50];scanf ( " %s " ,s ) ; fun ( s ) ; printf ( " %s\n " ,s ) ;}程序运行后输入: abcdef 回车 ,则输出结果是 【 12 】 。
考题
以下程序的输出结果是【】。 include using namespace std; int main() {char S[]="abcde
以下程序的输出结果是【 】。include <iostream>using namespace std;int main(){char S[ ]="abcdef";s[3]='\0';cout<<s<<end1;return 0;}
考题
有以下程序:includemain(){char *p,*q;p=(char*)malloc(sizeof(char)*20);q=p;scanf(
有以下程序: #include <stdlib.h> main() { char *p,*q; p=(char*)malloc(sizeof(char)*20); q=p; scanf("%s%s",p,q); ptintf("%s%s\n",p,q); } 若从键盘输入abc def<回车>,则输出的结果是( )。A.def defB.abc defC.abc dD.d d
考题
有以下程序:includevoid fun(char**p){++P;printf("%s\n",*p);}main()char*a[]={"Morn
有以下程序: #include<stdio.h> void fun(char**p) { ++P;printf("%s\n",*p);} main() char*a[]={"Morning","Afternoon","Evening","Night"}; fun(A); } 程序的运行结果是( )。A.AfternoonB.fternoonC.MorningD.oring
考题
有以下程序: includemain(){char*p,*q; p=(char *)malloc(sizeof(char)* 20);q=p; sca
有以下程序: # include<stdio.h> main() { char*p,*q; p=(char *)malloc(sizeof(char)* 20);q=p; scanf("%s %s",p,q);printf("%s %s\n",p,q); } 若从键盘输入;abc def<回车>,则输出结果是 ______。A.def defB.abc defC.abe dD.d d
考题
有以下程序: include using namespace std; constxntN=5; int fun(char*s,char a,int
有以下程序:include <iostream>using namespace std;const xnt N=5;int fun(char *s,char a,int n){int j;*s=a;j=n;while(a<s[j])j--;return j;}int main(){char s[N+1];int k;
考题
有以下等程序include void f(char *s, char *t){ chark; k=*s; *s=*t; *t=k; s++;t-
有以下等程序#include <string. h>void f(char *s, char *t){ char k; k=*s; *s=*t; *t=k; s++; t--; if(*s) f(s, t);}main (){ char stt[10] ="abcdefg", *p; p=str+strlen (str)/2+1; f (p,p-2); print f ( "%s\n", str);}A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg
考题
以下程序的输出结果是【】。 include include void main 0 { char s[50]; st
以下程序的输出结果是【 】。include<iostream.h>include <string.h>void main 0 {char s[50];strcpy(s[O], "No" );strcpy(s[1], "123" );strcpy (s[2], "23456" );cout<<s;}
考题
有以下程序: include main ( ){char s[] = "ABCD", * p;for(p=s+1;p
有以下程序: #include < stdio. h > main ( ) { char s[] = "ABCD", * p; for(p=s+1;p<s+4;p++) pfintf(" % s \n" ,p); }A.ABCD BCD CD DB.A B CC.B C DD.BCD CD D
考题
有以下程序 include void fun(char **p) { ++p; printf("%s\n",*p);
有以下程序 #include <stdio.h> void fun(char **p) { ++p; printf("%s\n",*p); } main() { char *a[]={"Moming","Afternoon","Evening","Night"}; fun(a); } 程序的运行结果是A.AfternoonB.fternoonC.MorningD.orning
考题
有以下程序段 includemain(){ char s[4][10];int i;scanf("%s%s",s[0],s[1]);gets(s[2
有以下程序段 # include<stdio.h> main() { char s[4][10]; int i; scanf("%s%s",s[0],s[1]);gets(s[2])gets(s[3]); for(i=0;i<4;i++) puts(s[i]); } 输入数据如下,aaaa bbbb<CR>(此处<CR>代表回车符) cccc dddd<CR> 输出结果是( )A.aaaa bbbb cccc ddddB.aaaa bbbb cccc ddddC.aaaa bbbb cccc dddd eeeeD.aaaa bbbb cccc dddd
考题
有以下程序: include main( ) {char s[ ] ="159" , * p;p=s;printf( "% c", * p + +
有以下程序: #include <stdio.h> main( ) { char s[ ] ="159" , * p; p=s; printf( "% c", * p + + ); printf("%~", * p++);}程序运行后的输出结果是( )。A.15B.16C.12D.59
考题
设有下列程序: include include main() { int i; char si 10],ti 10]; gets(
设有下列程序:include<stdio.h>include<string.h>main(){ int i;char si 10],ti 10];gets(t);for(i=0;i<2;i++){ gets(s);if(strcmp(t,s)<0)strcpy(t,s);}printf("%s\n",t);}程序运行后,从键盘上输入(<CR>代表回车符):CDEF<CR>BADEF<CR>QTHRG<CR>,则程序的输出结果是______。
考题
有以下程序includemain(){ char*p,*q;p=(char *)malloc(sizeof(char)*20);q=p;scanf(
有以下程序 #include<stdlib.h> main() { char*p,*q; p=(char *)malloc(sizeof(char)*20);q=p; scanf(“%s%s”,p,q);printf(“%s%s\n”,p,q); } 若从键盘输入:abc def<回车>,则输出结果是A.def defB.abc defC.abc dD.d d
考题
以下程序运行后,输出结果是______。includess(char*s){char *p=s; while(*.p)p++; retu
以下程序运行后,输出结果是______。#include<stdio.h>ss (char *s){ char *p=s; while(*.p)p++; return(p-s);}main(){ char *a="abded"; int i; i=ss((A); print ("%d\n",i);}A.8B.7C.6D.5
考题
有以下程序include main(){ char *p,*q;p=(char*)malloc(sizeof(char)*20);q=p;scanf
有以下程序 #include <stdlib.h> main() { char *p,*q; p=(char*)malloc(sizeof(char)*20); q=p; scanf("%s %s",p,q); printf("%s %s\n",p,q); } 若从键盘输入:abc def<回车>, 则输出结果是A.def defB.abc delC.abc dD.d d
考题
有以下程序 #includestdio.h main( ) {char a[3O],b[30]; scanf("%S",a); gets(b); printf("%s\n%s\\n",a,b); } 程序运行时若输入: how are you? I am fine回车 则输出结果是( )。A.how are you? I am fineB.how are you?I am fineC.how are you?I am fineD.how are you?
考题
有以下程序#include stdio.hmain( ){ char a[20], b[20], c[20];scanf("%s%s", a,b);gets(c);printf("%s%s%s\n", a,b,c);}程序运行时从第一列开始输入:This is a cat!回车则输出结果是A) Thisisacat!B) Thisis aC)'Thisis a cat!D) Thisisa cat!
考题
请读程序: includde include void fun(char * s) {char a[10]; str
请读程序: # includde<stdio.h> # include<string.> void fun(char * s) {char a[10]; strcpy(a,"STRING"); s=a; } main() { char*p; fun(p); print{("%s\n",p); } 上面程序的输出结果(表示空格) ( )A.STRINGB.STRINGC.STRINGD.不确定的值
考题
以下程序:includemain(){char str[10];scanf("%s",str);printf("%s\n",str);}运
以下程序: #include<stdio.h> main() {char str[10]; scanf("%s",str); printf("%s\n",str); } 运行上面的程序,输入字符串how are you,则程序的执行结果是( )。A.howB.how are youC.hD.howareyou
考题
有以下程序includestdio.hmain(){char a[30],b[30];scanf(“%s”,a);gets(b);printf(“%s\n%s\n”,a,b);}程序运行时若输入:how are you? I am fine回车则输出结果是A.how are you? I am fineB.how are you? 1 am fineC.how are you? I am fineD.how are you?
考题
下列程序中,正确的为______。A.main() { int *pb=b; float 1>=15.25; print f("%d\n" ,*pb); }B.amin() { int a,*pa; a=10; *pa=a; prinffC%d",*pa); }C.main() { char s[20]; char *ps=s; scanf("%s",*p); printf("%s",*p); }D.main() { char str[10]; int *ps=str[0]; str="abcdefg"; printf("%s",*p); }
考题
有以下程序: include include void f(char * s,char*t){char k; k=*s;*s=*
有以下程序: #include <stdio.h>#include <string.h>void f(char * s,char*t){ char k; k=*s; *s=*t; *t=k; s++; t--; if( * s) f(s,t);}main( ){ char str[10] :"abedefg", * p; p = str + strlen(str)/2+1; f(p,p -2); printf( "% s \n" ,str);程序运行后的输出结果是( )。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg
考题
有以下程序: include main( ) { char *p ,* q; p=(char * )malloc(sizeof(char
有以下程序: #include<stdlib.h> main( ) { char *p ,* q; p=(char * )malloc(sizeof(char) * 20);q=p; scanf("%s%s",p,q); printf("%s%s\n",p,q); } 若从键盘输入:abc def<回车>,则输出结果是A.def defB.abc defC.abc dD.d d
考题
以下能将字符串,you are luck!正确读入的语句组是( )A.char s[80]; scanf("%s",s);B.char *s: scanf("%s",s);C.char s[80]; gets(s);D.char *s; gets(3);
考题
有以下程序:include include using namespace std;int main (){ char s[]="
有以下程序: #include <iostream> #include <string> using namespace std; int main () { char s[]="\n123\\"; cout<<strlen (s) <<", "<<sizeof (s) <<end1; return 0; }A.赋初值的字符串有错B.6,7C.5,6D.6,6
考题
(29)有以下程序include stdio.hvoid fun(char *c){ while(*c){ if(*c='a'stdio.hvoid fun(char *c){ while(*c){ if(*c='a'*c='z') *c=*c-('a'-'A');c++;}}main(){ char s[81];gets(s); fun(s); puts(s):}当执行程序时从键盘上输入Hello Beijing回车,则程序的输出结果是A)hello beijingB)Hello BeijingC)HELLO BEIJINGD)hELLO Beijing
热门标签
最新试卷