有下列程序:#includestdi0.hvoidmain( ){stuctSTU{charname[9];charsex;doublescore[2];};stuctSTUa={Zha0,m,85.0,90.0),b={Qian,f,95.0,92.0};b=a:printf(%S,%C,%2.0,%2.0\n”,b.name,b.sex,score[O],bscore[1]);程序的运行结果是( )。A.Qian,f,95,92B.Oian,m,85,90C.Zha0,f,95,92D.Zha0,m,85,90
有下列程序:
#include<stdi0.h>
voidmain( )
{stuctSTU{charname[9];charsex;double
score[2];};
stuctSTUa={"Zha0",'m',85.0,90.0),b={"
Qian",'f',95.0,92.0};
b=a:
printf("%S,%C,%2.0,%2.0\n”,b.name,b.sex,
score[O],bscore[1]);
程序的运行结果是( )。
A.Qian,f,95,92
B.Oian,m,85,90
C.Zha0,f,95,92
D.Zha0,m,85,90
相关考题:
有以下程序#include stdio.hmain(){struct STU { char name[9]; char sex; double score[2];};struct STU a={"Zhao",'m',85.0,90.0},b={"Qian",'f',95.0,92.0};b=a;printf("%s,%c,%2.0f,%2.0f\n", b.name, b.sex, b.score[0], b.score[1]);}程序的运行结果是A)Qian,f,95,92B)Qian,m,85,90C) Zhao,f,95,92D)Zhao,m,85,90
有以下程序includeincludetypedef strtlct{char name[9];char sex;floatsc 有以下程序 #include <stdio.h> #include <string.h> typedef strtlct{ char name[9]; char sex;floatscore[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;i<2;i++) a.score[i]=bA.Qian,f,95,92B.Qian,m,85,90C.Zhao,f,95,92D.Zhao,m,85,90
有下列程序:includeinclude "string.h"typedef struct{char name[9]; char sex;float 有下列程序: #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;i<2;i++) a.score[i]=b.score[i]; } main() { STU c={"Qian",'f',95.0,92.0}; f(C) ; printf("%s,%c,%2.0f,%2.0f\n",c.name,c.sex,c.score[0],c.score[1]); } 程序的运行结果是( )。A.Qian,f,95,92B.Qian,m,85,90C.Zhao,f,95,92D.Zhao,m, 85,90
下面程序和运行运行结果是【 】。typedef union student{ char name [10];long sno;char sex;float score [4];} STU;main ( ){ STU a[5];prinff( "% d\n", sizeof(a) );}
有下列程序: #includestdi0.h voidmain( ) {stuctSTU{charname[9];charsex;double score[2];}; stuctSTUa={"Zha0",m,85.0,90.0),b={" Qian",f,95.0,92.0}; b=a: printf("%S,%C,%2.0,%2.0\n”,b.name,b.sex, score[O],bscore[1]); 程序的运行结果是( )。A.Qian,f,95,92B.Oian,m,85,90C.Zha0,f,95,92D.Zha0,m,85,90
有以下程序 include main() { struct STU{char name[9];char sex;double 有以下程序 #include <stdio.h> main() { struct STU{char name[9];char sex;double score[2];}; sturt STU a={"Zhao" ,'m',85.0,90.0},b={"Qian" ,'f,95:0,92.0}; b=a; printf("%s,%c,%2.0f,%2.0f\n",b.name,b.sex,b.score[0],b.score[1]); } 程序的运行结果是______。A.Qian,f,95,92B.Qian,85,90C.Zhao,f,95,92D.Zhao,m,85,90
下面程序的运行结果是typedef union student{ char name[10]; long sno; char sex; float score[4];}STU;main(){ STU a[5]; printf("%d\n",sizeof(a));}
有以下程序 include include typedef stmct{ char name[9];char sex;flo 有以下程序#include <stdio.h>#include <string.h>typedef stmct{ 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;i<2;i++) a.score[i]=b.score[i];main( ){ STU c={"Qian",'f',95.0,92.0};f(c);printf("%s,%c,%2.0f,%2.0f\n",c.name,c.sex,c.score[0],c.score[1]) ;}程序的运行结果是A.Qian,f,95,92B.Qian,m,85,90C.Zhao,f,95,92D.Zhao,m,85,90
以下程序用来输出结构体变量ex所占存储单元的字节数,请填空。 #include <stdio.h> struct st { char name[20]; double score; }; void main() { struct st ex; printf(“ex size: %dn”,sizeof());