以下程序的输出结果是( )。 include main() {char*s1,*s2,m; s1=s2=(char*)malloc(size 以下程序的输出结果是( )。include<stdlib.h>main(){char*s1,*s2,m;s1=s2=(char*)malloc(sizeof(char));*s1=15;*s2=20;m=*s1+*s2:printf("%d\n",m);}

以下程序的输出结果是( )。 include main() {char*s1,*s2,m; s1=s2=(char*)malloc(size

以下程序的输出结果是( )。

include<stdlib.h>

main()

{char*s1,*s2,m;

s1=s2=(char*)malloc(sizeof(char));

*s1=15;

*s2=20;

m=*s1+*s2:

printf("%d\n",m);

}


相关考题:

以下程序的输出结果是 【 18 】 。# include stdlib.hmain( ){ char *s1,*s2,m;s1=s2=(char*)malloc(sizeof(char));*s1=15; *s2=20; m=*s1+*s2;printf("%d\n",m);}

有以下程序void swap(char *x,char *y){ char t;t=*x; *x=*y; *y=t;}main(){ char *s1="abc",*s2="123";swap(s1,s2);printf(" % s, % s\n",s1,s2);}程序执行后的输出结果是A)123,abcB)abc,123C)1bc,a23D)321,cba

以下程序的输出结果是______# includemain(){char *s1,*s2,m;s1=s2=(char*)malloc(sizeof(char));*s1=15;*s2=20;m=*s1+*s2;printf(“%d\n”,m);}

下面程序的输出结果是( )。#include "string.h"fun(char*w,int n){ char t,*s1,*s2;s1=w; s2=w+n-1;while(s1s2){ t=*s1++;*s1=*s2--;*s2=t;}}main(){ static char p[]="1234567";fun(p,strlen(p));printf("%s",p);}A.7654321 B.1717171 C.7171717 D.1711717

下列程序的运行结果是()。includeincludemain(){ char*s1="ahDuj";char*s2= 下列程序的运行结果是( )。#include<stdio.h>#include<string.h>main(){ char*s1="ahDuj"; char*s2="ABdUG": int t; t=strcmp(s1,s2); printf("%d", t);}A.正数B.负数C.零D.不确定的值

有以下程序并includeincludefun(char * w,int n){char t,*s1,*s2; s1=w;s2= 有以下程序 并include<stdio.h> #include<string.h> fun(char * w,int n) { char t,*s1,*s2; s1=w; s2=w+n-1; while(s1<s2) { t=*s1++; * s1=*s2--; * s2=t; } } main() { char p[]="1234567"; fun(p,strlen(p)); puts(p); } 程序运行后的输出结果是( )A.1234567B.7654321C.1711717D.7177171

对于下面的程序includeincludechar *scmp(char*s1,char*s2){if(strcmp(s1, 对于下面的程序 #include<stdio.h> #include<string.h> char *scmp(char*s1,char*s2) { if(strcmp(s1,s2)<0)return(s1); else return(s2); } main() { int i:char string[20],sb[3][20]; for(i=0;i<3;i++)gets(str[i]); strcpy(string,scmp(str[0],str[1])); strcpy(string,scmp(string,str[21)); printf("%s\n",string); } 若运行时依次输入abcd、abba和abc三个字符串,则输出结果为______。A.abcdB.abbaC.abcD.abca

下列程序的运行结果是()。 include include main() {char*s1="abDuj"; char 下列程序的运行结果是( )。#include<stdio.h>#include<string.h>main(){ char*s1="abDuj";char*s2="ABdUG";int t;t=strcmp(s1,s2) ;printf("%d",t);}A.正数B.负数C.零D.不确定的值

以下程序的输出结果是______。includeincludefun(char*w,int n){ char t,*s 以下程序的输出结果是______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) { t=*s1++; *s1=*s2-; *s2=t; } } main() { char*p; p="1234567"; fun(p,strlen(p)); puts(p); }A.1234567B.7654321C.1711717D.7177171

以下程序的输出结果是()includemain(){chars1[]="123",s2[]="abc",ss[20]="010";strc 以下程序的输出结果是 ( ) #include<string.h> main() {char s1[]="123",s2[]="abc",ss[20]="010"; strcat(ss+1,strcpy(s2,s1)); printf("%s\n",ss); }A.10123B.0abcC.1123D.01abc

请读程序:includeincludemain(){char *s1="AbCdEf",*s2="aB"; s1++;s2++; 请读程序: #include<stdio.h> #include<string.h> main() { char *s1="AbCdEf",*s2="aB"; s1++;s2++; printf("%d\n",strcmp(s1,s2)); } 上面程序的输出结果是______。A.正数B.负数C.零D.不确定的值

有以下程序: void swap(char*x,char*y) {cbar t; t=*x; *x=*y; *y=t; } main() {char*s1="abc",*s2="123"; swap(s1,s2);printf("%s,%s\n",s1,s2); } 程序执行后的输出结果是( )。A.123,abcB.abc,123C.1bc,a23D.321,cba

以下程序的输出结果是 ______。includevoid main(){ char s1[]=”Hello”,s2[]="World 以下程序的输出结果是 ______。 #include<iostream.h> void main(){ char s1[]=”Hello”,s2[]="World"; char *p1,*p2; int i; p1=s1; p2=s2; for(i=0;i<5;i++) if(*(pl+i)==*(p2+i)) cout<<*(p1+i); }A.H1B.HoC.10D.1

下列程序运行后,输出结果是______。 include include fun(char *w ,int 下列程序运行后,输出结果是______。 #include <stdio. h> #include <string. h> fun (char *w ,int n) { char t,*s1,*s2; s1=w; s2=w+n-1; while (s1<s2) { t=*s1++; *s1=*s2--; *s2=t; } } main () { char *p; p="1234567"; fun (p, strlen (p)); puts (p); }A.1234567B.7654321C.1711717D.7177171

以下程序includemain(){char a1[80],a2[80],*s1=a1,*s2=a2; gets(s1);gets(s2) if(!s 以下程序 #include<string.h> main() { char a1[80],a2[80],*s1=a1,*s2=a2; gets(s1);gets(s2) if(!strcmp(s1,s2))printf("*"); else printf("#"); printf("%d\n",strlen(strcat(s1,s2))); } 如果从键盘上输入: book<回车> book<空格><回车> 则输出结果是( )A.*8B.#9C.#6D.*9

下面程序的运行结果是includeincludemain(){ char*s1="AbDeG";char*s2="Ab 下面程序的运行结果是 #include<stdio.h> #include<string.h> main() { char*s1="AbDeG"; char*s2="AbdEg"; s1+=2;s2+=2; printf("%d\n",strcmp(s1,s2)); }A.正数B.负数C.零D.不确定的值

以下程序的输出结果是_______。includeincludefun(char*w,int n){char t,*s 以下程序的输出结果是_______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) { t=*s1++: *sl=*s2-; *s2=t; } } main() { char*p; p="1234567"; fun(p,strlen(p)); puts(p); }A.1234567B.7654321C.1711717D.7177171

有以下程序:include void swap(char * x,ehar * y){ char t;t= *x; *x: *y; *y=t;main 有以下程序:#include <stdio.h>void swap(char * x,ehar * y){ char t; t= *x; *x: *y; *y=t;main ( ){ char *s1 ="abc", * s2 ="123"; swap(s1 ,s2); printf("%s,%s \n" ,s1 ,s2);}程序执行后的输出结果是( )。A.123,abeB.abe,123C.1bc,a23D.321,cba

有以下程序:include using namespace std;int main ( ){ char s1[10],s2[10]; char*p 有以下程序: #include <iostream> using namespace std; int main ( ) { char s1[10],s2[10]; char *p=s1,*q=s2; cin>>s1>>s2; while (*p ! =' \0 ' ) p++; while (*q!='\0') *p++=*q++; *p='\0'; cout<<s1<<end1; return 0; }A.abcd0ghijB.abcd0ghij0C.abcdD.abcdghij

下面程序的运行结果是______。 include include fun(char*w,int n) { char 下面程序的运行结果是______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) {t=*s1++;*s1=*s2--;*s2=t;} } main() { char*p; p="1234567"; fun(p,strlen(p)); puts(p); }A.7654321B.1714171C.1711717D.7177171

下列程序的运行结果是()。      #include   #include   FUN(char *w,int n)  {   char temp,*s1,*s2; s1=w;  s2=w+n-1;  while(s1temp=*s1++;  *s1=*s2--;  *s2=temp;  }  }      main( )  {   char *p;  p=“1234567”;  FUN(p,strlen(p));  puts(p);  }

有以下程序  void swap(Char *x,Char *y)      {Char t;     t=*x;*x=*y;*y=t;      }   main( )  {Char *s1=”abc”,*s2=”123”;      swap(sl,s2);  printf(”%s,%s/n”,s1,s2);     }  程序执行后的输出结果是()A、abe,123B、123,abcC、321,cbaD、1bc,a23

填空题下列程序的运行结果是()。      #include   #include   FUN(char *w,int n)  {   char temp,*s1,*s2; s1=w;  s2=w+n-1;  while(s1temp=*s1++;  *s1=*s2--;  *s2=temp;  }  }      main( )  {   char *p;  p=“1234567”;  FUN(p,strlen(p));  puts(p);  }

单选题有以下程序:#include main(){ char s1[]=programe,s2[]=Language; char *p1=s1,*p2=s2; int k; for(k=0;k8;k++)  if(*(p1+k)==*(p2+k))   printf(%s ,(p1+k));}程序的运行结果是(  )。Agrame ame eBg a eCprogrameD无输出字符

单选题有以下程序  void swap(Char *x,Char *y)      {Char t;     t=*x;*x=*y;*y=t;      }   main( )  {Char *s1=”abc”,*s2=”123”;      swap(sl,s2);  printf(”%s,%s/n”,s1,s2);     }  程序执行后的输出结果是()Aabe,123B123,abcC321,cbaD1bc,a23

单选题有以下程序:#include #include struct S{ char name[10];};main(){ struct S s1,s2; strcpy(s1.name,XXX); strcpy(s2.name,=); s1=s2; printf(%s,s1.name);}程序运行后的输出结果是(  )。A=BXXXC=XXDX=

单选题有以下程序#includevoidswap(char*x,char*y){ chart; t=*x; *x=*y; *y=t;}main(){ char*s1,*s2; chara[]=abc; charb[]=123; s1=a; s2=b; swap(s1,s2); printf(%s,%s,s1,s2);}程序执行后的输出结果是(  )。A1bc,a23Babc,123C123,abcD321,cba