有以下程序: #include string.h main( ) { char a[]={'a','b','c','d','e','f','g','h','\0'};int i,j; i=sizeof(a);j=strlen(a); printf(%d,%d\b,i,j); } 程序运行后的输出结果是( ).
相似题目
-
当执行下面的程序时,如果输入ABC,则输出结果是()。 #include "stdio.h" #include "string.h" main() { char ss[10]="12345"; gets(ss); strcat(ss,"6789"); printf("%s\n",ss); }
-
以下程序的输出结果是( ) #include iostream.h #include string.h void main() { char *p[10]={abc,aabdfg,dcdbe,abbd,cd}; cout<
-
写出以下程序运行后的输出结果。 #includestdio.h #include string.h int main() { char st[20]={hello\0\t\\\}; printf(%d,%d\n,strlen(st),sizeof(st)); return 0; }
-
下面程序的输出结果是( ).#include \string.h\main( ){ char *p1=\abc\,*p2=\ABC\,str[50]= \xyz
-
下面程序的运行结果是______。 #include < stdio.h > #include < string.h > main() { char a[7]=\abcdef\,b[4]=\ABC
-
有以下程序 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<stdio.h>include<string.h>main(){ char a[]="\n123\\"; printf("%d,%d\n",strlen(A) ,sizeof(A) );}
-
有下面程序段 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);} 则程序段的输出结果是
-
有以下程序 include <string.h> main(int argc ,char *argv[ ]) { int i,len=0; for(i=1;i
-
有以下程序 include<string.h> main() { char *p=“abcde、Ofghjik\0”; printf(“%d\n”,strlen(p)); } 程序运行后的输出结果
-
下列程序的输出结果是()。 include<stdio.h> include<string.h> main() { char a[]="\n123\\"; printf("%d,%d\n",strlen(a),sizeof(a)); }
-
有以下程序 include <string.h> main(int argc, char *argv[]) {int i=1,n=0; while(i<argc) {n=n+strlen(argv[i]);i++;} printf("%d\n",n); } 该程序生成的可执行文件名为:proc.exe。若运行时输入命令行: proc 123 45 67 则程序的输出结果是______。
-
有以下程序: include<stdio.h> include<string.h> main() {char str[][20][{"One*World","One*Dream!"},*p=str[1]; prinft("%d,",strlen(p));printf("%s\n",p); } 程序运行后的输出结果是()。
-
有以下程序:# include <stdio.h># include <string.h>main(){char x[]="STRING";x[0]=0;x[1]="\0";x[2]="0";printf("%d%d\n", sizeof(x),strlen(x));}程序运行后的输出结果是______。
-
设已执行预编译命令include<string.h>,以下程序段的输出结果是char s[]=" an apple" ;printf(" %d\n",strlen(s));
-
有以下程序(strcat函数用以连接两个字符串)include<stdio.h>include<string.h>main(){char a[20]=”ABCD\0EFG\0”,b[]=”IJK”;strcat(a,b);printf(”%s\n”,a);}程序运行后的输出结果是()。
-
有以下程序: include<stdio.h> include<string.h> struct A {int a;char b[10];double C;); struct A f(struct A t): main() {struct A a={1001,"ZhangDa",l098.0}; a=f(a);printf("%d,%S,%6.1f\n",a.a,a.b,a.c); } struct A f(struct A t) {t.a= 1002;strcpy(t.b,"ChangRon9");t.c=1202.0;return t;} 程序运行后的输出结果是()。
-
有以下程序,其中函数f的功能是将多个字符串按字典顺序排序()。 include<string.h> void f
-
有以下程序(strcat函数用以连接两个字符串) include<stdio.h> include<string.h>。
-
有以下程序 include<stdio.h>include<string.h>void fun(); } 程序运行后的输出结果是
-
有以下程序 include<stdio.h>include<string.h>typedef struct stu { char name[10]; char gender; int score; } STU; void f(); } 程序的运行结果是
-
以下程序的输出结果是include<stdio.h>include<string.h>main{charb1[18]=abcdefg,b2[8],*pb=b1+3;while(--pb>=b1)strcpy(b2,pb);printf(%d\n,strlen(b2));}()
-
有以下程序:includ<stdio.h>include<string.h>main()chaa[10]="abcd";printf("%d,%",strlen(a),sizeof(a));}程序运行后的输出结果是()
-
有以下程序: include<stdio.h> include <string.h> typedef struct char name[9]; char sex; float score[2]; STU; void f(STU a) STU b="Zhao", "m", 85.0, 90.0; int i; strcpy(a.name, b.name); a.sex=b.sex; for (i=0