网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有以下程序 main() {char a[]="abcdefg",b[10]="abedefg"; pfintf("%d%d\n",sizeof(a) ,sizeof(b) ); } 执行后输出结果是

A.77

B.88

C.810

D.1010


参考答案

更多 “ 有以下程序 main() {char a[]="abcdefg",b[10]="abedefg"; pfintf("%d%d\n",sizeof(a) ,sizeof(b) ); } 执行后输出结果是A.77B.88C.810D.1010 ” 相关考题
考题 有以下程序: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

考题 有以下程序: 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

考题 有以下程序 #includestdio.h #incl udestring.h main( ) {char a[10]=”abcd”; printf("%d,%d\n",strlen(a),sizeof(a)); } 程序运行后的输出结果是( )。A.7,4B.4,10C.8,8D.10,10

考题 以下程序的输出结果是()includemain(){struct stru{int a,b:char c[6];}:printf("%d\n 以下程序的输出结果是 ( ) #include<stdio.h> main() {struct stru{int a,b: char c[6]; }: printf("%d\n",sizeof(stru)), }A.2B.4C.8D.10

考题 有以下程序 main () { char p[]={'a','b','c},q[] ="abc"; printf ( "%d %d\n" , sizeof (p) , sizeof (q)); } 程序运行后输出结果是A.4 4B.3 3C.3 4D.4 3

考题 有以下程序:includemain(){char a[]="abcdefg",b[10]="abcdefg"; printf("%d%d\n",siz 有以下程序: #include <stdio.h> main() { char a[]="abcdefg",b[10]="abcdefg"; printf("%d%d\n",sizeof(a),sizeof(b)); } 执行后的输出结果是( )。A.7 7B.8 8C.8 10D.10 10

考题 以下程序的输出结果是______。 main() { char st[20]="hello\0\t\\"; printf("%d%d\n",strlen(st),sizeof(st)); }A.99B.520C.1320D.2020

考题 下面程序和运行运行结果是【 】。typedef union student{ char name [10];long sno;char sex;float score [4];} STU;main ( ){ STU a[5];prinff( "% d\n", sizeof(a) );}

考题 有以下程序: main() { chara[]="abcdefg",b[10]="abcdefg"; printf("%d %d\n",sizeof(a),sizeof(b)); } 执行后输出结果是( )。A.7 7B.8 8C.8 10D.10 10

考题 有以下程序#include "stdio.h"main(){ struct date { int number; float fenzhi; char name; }stu; printf("%d\n",sizeof(stu));} 程序的运行结果是A.3 B.5C.7 D.8

考题 以下程序的输出结果是【】。 include main() {struct stru {int a; float b; char d[4]; } 以下程序的输出结果是【 】。include<stdio.h>main(){ struct stru{ int a;float b;char d[4];};printf("%d\n",sizeof(struct stru));}

考题 有以下程序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

考题 下列程序在32位linux或unix中的结果是什么?func(char *str){printf("%d",sizeof(str));printf("%d",strlen(str));}main(){char a[]="123456789";printf("%d",sizeof(a));func(a);}

考题 有以下程序的输出结果是( ) main( ) { char a[ ]=”abcdefg”,b[10]=”abcdefg”; printf(“%d %d\n”,sizeof(a),sizeof(b));}A.7 7B.8 8C.8 10D.10 10

考题 char str[ ]= "Hello";char *p=str;int n=10;sizeof(str)=( )sizeof(p)=( )sizeof(n)=( )void func(char str[100]){ }sizeof(str)=( )

考题 有下列程序: main { char p[]={a,h,c},q[]="a"; printf("%d%d\n".sizeof(P),sizeof(q)); } 程序运行后的输出结果是( )。A.4 4B.3 3C.3 4D.4 3

考题 下面程序的运行结果是typedef union student{ char name[10]; long sno; char sex; float score[4];}STU;main(){ STU a[5]; printf("%d\n",sizeof(a));}

考题 以下为 Windows NT 下的 32位 C++程序,请计算 sizeof的值char str[] = “Hello” ; char *p = str ;int n = 10;请计算 sizeof (str )= sizeof ( p ) = sizeof ( n ) = void Func (char str[100]){请计算 sizeof( str ) = }void *p = malloc( 100 );请计算 sizeof ( p ) =

考题 有以下程序:include main( ){char P[] = {'a','b','c'} ,q[]: "abc";printf( "% d % d 有以下程序:#include <stdio.h>main( ){ char P[] = {'a','b','c'} ,q[]: "abc"; printf( "% d % d \ n", sizeof(p), sizeof(q) );}程序运行后的输出结果是( )。A.44B.33C.34D.43

考题 阅读以下程序,写出程序运行后的输出结果是 ______。includevoid main(){ char a[]={ 阅读以下程序,写出程序运行后的输出结果是 ______。 #include<iostream.h> void main(){ char a[]={'H','e','r','1',‘o’,'\0'}; int i, j; i=sizeof(a)/sizeof(char); j=strlen(a) cout<<i<<' '<<j; }A.6 6B.5 6C.1 5D.6 5

考题 有下列程序:main{ char p[]={a,h,c},q[]=ahc;printf(%d%d\n.sizeof(P),sizeof(q));}程序运行后的输出结果是( )。A.4 4B.3 3C.3 4D.4 3

考题 有以下程序,程序运行的结果是 ______。includeincludevoid main(){charx 有以下程序,程序运行的结果是 ______。 #include<iostream.h> #include<string.h> void main(){ char x[]= "C++" ,y[10]= "C++" ; cout<<sizeof(x)/sizeof(char)<<“,”<<sizeof(y)/sizeof(char); }A.3 3B.4 4C.4 10D.10 10

考题 有以下程序: 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

考题 有以下程序 main ( ) { char a [] = "abcdefg", b [10] ="abcdefg"; printf ("%d %d\n" ,sizeof (a) ,sizeof (b)); } 执行后输出结果是A.7 7B.8 8C.8 10D.10 10

考题 有以下程序: include include main() { char str[ ]={"Hello,Beijing"}; printf("%d,%d\n",strlen(str),sizeof(str)); } 程序的运行结果是( )。 A.13,13B.13,14C.13,15D.14,15

考题 有以下程序: main() { char a[]="abcdefg",b[10]="abedefg";printf("%d%d\n",sizeof(A) ,sizeof(B) ); } 执行后输出结果是( )。A.7 7B.8 8C.8 10D.10 10

考题 以下程序的输出结果是( ) main() { char ss[16]="test\0\n\""; printf("%d,%d\n",strlen(ss),sizeof(ss)): }A.4,16B.7,7C.16,16D.4,7