当执行下面的程序时,如果输入ABC,则输出结果是()。 #include "stdio.h" #include "string.h" main() { char ss[10]="12345"; gets(ss); strcat(ss,"6789"); printf("%s\n",ss); }
函数char* fun(char *p){ return p; }的返回值是:
以下程序的运行结果是( )。 #include stdio.h void abc( char *p) { int i,j; for (i=j=0;*(p+i)!='\0';i++) if (*(p+i) < 'n') { *(p+j)=*(p+i); j++; } *(p+j)='\0'; } int main() { char str[]=moring
以下程序的输出结果是( ) #include iostream.h #include string.h void main() { char *p[10]={abc,aabdfg,dcdbe,abbd,cd}; cout<
以下程序的输出结果是( )。#include char cchar(char ch){if(ch>='A' && ch<='Z')ch=ch-'A'+'a';return ch;}int main( ){char s[ ]=\ABC+abc=defDEF\,*p=s;while(*p){*p=cchar(*p);p++;}printf(\%s\\n\,s);return 0;}
有以下程序: 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<回车>,则输出的结果是()。
若有以下说明和语句:sturct st { int n;char *ch;}; struct st a[3]={5, "abc",7, "def",9, "ghk"},*p=a;则值为6的表达式是()。A)p++->n B)p->n++C)(*p).n++ D)++p->n
有以下程序 include <string.h>main(){char p[20]={′a′, ′b′, ′c′, ′d′}, q[]="abc", r[]="abcde";strcat(p, r); strcpy(p+strlen(q), q);printf("%d\n",strlen(p));}程序运行后的输出结果是
有以下程序 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<回车>,则输出结果是
有下面程序段 include"stdio.h" include"string.h" main() { char a[3][20]={{"china"},{"isa"},{"bigcountry!"}}; chark[100]={0},*p=k; int i; for(i=0;i<3;i++) {p=strcat(p,a[i]);} i=strlen(p); printf("%d\n","i);} 则程序段的输出结果是
有以下程序includemain(){ char p[20]={'a','b','c','d'},q[ ]="abc",r[ ]="abcde';strcat(p,r) ;strcpy(p+strlen(q),q);printf("%d\n",strlen(p));}程序运行后的输出结果是
以下程序段运行后,表达式*(p+4)的值为()。﹤br/> char a[]="china"; char *p; p=a;
若有以下说明和语句: struct st{int n;char *ch;}; struct st a[3]={5,"abc",7,"def",9,"ghk"},*p=a; 则值为6的表达式是______。
下列程序段中,不能正确赋值的是()。A.char*p,ch; p=&ch; scanf("%c",&p);B.char*p; p=(ch
下面程序段的运行结果是()。 include<stdio.h> void main() {char str[]="ABC",*p=str; pfintf("%d\n",*(p+3)); }
当执行下面的程序时,如果输入ABC,则输出结罘是()。 include<stdio.h> include<string.h> main() { char ss[10]="1,2,3,4,5": gets(ss);strcat(ss,"6789");printf("%s\n",ss); }
有以下程序:point(char *p){ p+=3;}main(){char b[4]={'a','b','c','d'}, *p=b; point(p); print
有以下程序: include<strintg.h> main { char p[20]={a,b,c,d),q[]="abc",r[]=" abcde"; strcpy(p+strlen(q),r);strcat(p,q); printf("%d%d\n",sizeof(p),strlen(p)); } 程序运行后的输出结果是()。
有以下程序 main (){char p[]={'a','b','c},q[] ="abc";printf ("%d%d\n" , sizeof (p) , sizeo
"以下函数Abc的功能是()int Abc(char *ps){ char *p;p=ps;while(*p++);return(p-ps);}
下面程序的功能是将字符串s的所有字符传送到字符串t中,要求每传递三个字符后再存放一个空格,例如字符串s为"abcdefg",则字符串t为"abc def g",请选择填空。 include "stdio.h" include "string.h" main() { int j, k=0; char s[60], t[100], *p; p=s; gets(p); while(*p) { for (j=1; j<=3 && *p; 【1】) t[k]=*p; if (【2】) { t[k]=' '; k++;} } t[k]='0'; puts(t); } 其中【2】应该填写
下面程序的输出结果为()。 include<string.h> void main() char p1[7]="abc",p2 ="ABC",str[50]="xyz"; strcpy(str,strcat(p1,p2)); printf("%s",str);
以下程序运行后输出的结果是______。 include <string.h> char*ss(char *s) char *p,t; p=s+1;t=*s; while(*p)*p=*(p-1);p++; *(p-1)=t; return s: main() char *p,str[10]="abcdefgh"; p=ss(str); printf("%s",p);
下面程序的功能是将字符串s的所有字符传送到字符串t中,要求每传递三个字符后再存放一个空格,例如字符串s为"abcdefg",则字符串t为"abc def g",请选择填空。 include "stdio.h" include "string.h" main() { int j, k=0; char s[60], t[100], *p; p=s; gets(p); while(*p) { for (j=1; j<=3 && *p; 【1】) t[k]=*p; if (【2】) { t[k]=' '; k++;} } t[k]='0'; puts(t); } 其中【1】应该填写