[单选题]

下列程序的输出结果是()。includemain(){struct st{int y,x,z;};union{long i; int j;

下列程序的输出结果是( )。 #include<stdio.h> main() { struct st { int y,x,z; }; union { long i; int j; char k; }un; printf("%d,%d/n",sizeof(struct st),sizeof(un)); }

A.6,2

B.6,4

C.8,4

D.8,6

参考答案与解析:

相关试题

以下程序的输出结果是______。struct date{long *a; st

[单选题]以下程序的输出结果是______。 struct date { long *a; struct date*next; double b; }too; printf("%d",sizeof(too));A.20B.16C.14D.12

  • 查看答案
  • 下列程序的输出结果是______。struct st{int x;int*y;}

    [单选题]下列程序的输出结果是______。struct st{ int x;int*y;}*p; int dt[4]={ 10,20,30,40 }; struct st aa[4]={50,&dt[0],60,&dt[0],60,&dr[0],60,&dr[0],} main(){ p=aa; printf("%d/n",++(p->x));}A.51B.11C.10D.60

  • 查看答案
  • 以下程序的输出结果是() struct st {int x;int * y;}*

    [单选题]以下程序的输出结果是 ( ) struct st { int x; int * y;} * p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,& dt[0],60 &dt[0],60,&dt [0]}; main( ) { p=aa; printf("%d/n",+ +(p->x)); }A.10B.11C.51D.60

  • 查看答案
  • 下列程序的输出结果是______。#includemain(){char *a=

    [单选题]下列程序的输出结果是______。#includemain(){ char *a="abcdefghi";int k; fun(a);puts(a);}fun(char*s){ int x,y;char c; for(x=0,y=strlen(s)-1;x<y;x++,y--) { c=s[y];s[y]=s[x];s[x]=c;}}A.ihgfsdcbaB.abcdcfghiC.abcdedebaD.ihgfefghi

  • 查看答案
  • 下列程序的输出结果是______。#includemain(){int a,b;

    [单选题]下列程序的输出结果是______。includemain(){int a,b;for(a=1,b=1;a=2下列程序的输出结果是______。 #include<stdio.h> main () { int a,b; for(a=1,b=1;a<=100;a++) { if(b>=20)break; if(b%3==1) { b+=3; continue; } b-=5; } printf("%d/n",a); }A.7B.8C.9D.10

  • 查看答案
  • 下列程序的输出结果是()。#includemain(){char a[]={'a

    [单选题]下列程序的输出结果是()。includemain(){char a[]={'a','b','c','d','e','f','/0'};int下列程序的输出结果是( )。 #include<stdio.h> main() { char a[]={'a','b','c','d','e','f','/0'}; int i,j; i=sizeof(a); j=strlen(a); printf("%d,%d",i,j); }A.7,7B.7,6

  • 查看答案
  • 下列程序的输出结果是( )。 #include main() { struct

    [单选题]下列程序的输出结果是( )。 include main() { struct st { int y,x,z; }; union {long下列程序的输出结果是( )。 #include <stdio.h> main() { struct st { int y,x,z; }; union { long i; int j; char k; } un; printf("%d,%d/n",sizeof(struct st),sizeof(un)); }A.6, 2B.6, 4C.8, 4D.8,

  • 查看答案
  • 以下程序的输出结果是 #include<stdio.h> struct st {

    [单选题]以下程序的输出结果是#include<stdio.h>struct st{ int x;int *y;}*p;int dt[4]={10,20,30,40};struct st aa[4]={50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],};main(){ p=aa;printf("%d/n",++(p->x));}A.10B.11C.51D.60

  • 查看答案
  • 以下程序的输出结果是 #include<stdio.h> struct st {

    [单选题]以下程序的输出结果是#include<stdio.h>struct st{ int x;int *y;}*p;int dt[4]={10,20,30,40};struct st aa[4]={50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],};main(){ p=aa;printf("%d/n",++(p->x));}A.10B.11C.51D.60

  • 查看答案
  • 下列程序的输出结果是()。#include#includemain(){ cha

    [单选题]下列程序的输出结果是()。includeincludemain(){ char a[]="/n123//";print下列程序的输出结果是( )。#include<stdio.h>#include<string.h>main(){ char a[]="/n123//"; printf("%d,%d/n",strlen(A) ,sizeof(A) );}A.5,6B.5,5C.6,6D.6,5

  • 查看答案
  • 下列程序的输出结果是()。#includemain(){struct st{in