以下程序的运行结果是( )。#include“stdio.h”main(){ struct date{intyear,month,day; }today;printf(“%d\n”,sizeof(struct date));}
有以下程序#include struct ball{char color[10];int dim;};int main( ){struct ball list[2] = {{white, 2}, {yellow, 3}};printf(%s:%d , (list+1)->color, list->dim);return 0;}程序运行后的输出结果是( )
有以下程序: #include struct S { int a,b; } data[2]={10,100,20,200}; void main() {struct S p; p=data[1]; printf(%d\n,++(p.a)); } 程序的运行结果是( )
有以下程序 #include struct st { int x, y;) data[2]={l,10,2,20}; main() { struct st *p=data; printf(%d,, p->y); printf(%d,(++p)->x); } 程序的运行结果是( )。
若有以下定义和语句struct student{ int age;int num;};struct student stu[3]={{1001,20},{1002,19},{1003,21}};int main(){struct student *p; p=stu;……}则以下不正确的引用是( )。
若有以下定义语句,则以下错误的引用是( )。struct student{int num,age;};struct student stu[3]={{101,20},{102,19},{103,18}},*p=stu;
以下程序的输出是( ) struct Student { char name[30]; float Score[3]; }student={'stu',98.5,89.0,93.5}; void Display(struct Student su) { printf('Name:%s ',su.name); printf('Score:%.2f',su.Score[0]); int main () { Display(student); return 0; }
有以下程序struct STU{char num[10];float score[3];}main(){struct STU s[3]={{\20021\,90,95,85},{\20022\,95,80,75},{\20023\,100,95,90}},*p=s;int i; float sum=0;for(i=0;i<3;i++)sum=sum+p->score[i];printf(\%6.2f\\n\,sum);}程序运行后的输出结果是()
08110012:有以下说明语句,则下面的叙述不正确的是( )。typedef struct stu{int a;float b}stutype;
以下代码将定义结构体类型,并定义结构体变量stu1和stu2。(第8章 结构体程序设计)student stu1,stu2;struct student{ char num[5];int score;};
有以下程序#include struct ball{char color[10];int dim;};int main( ){struct ball list[2] = {{\white\, 2}, {\yellow\, 3}};printf(\%s:%d\, (list+1)->color, list->dim);return 0;}程序运行后的输出结果是( )
若有以下定义语句,则以下错误的引用是( )。 struct student { int num,age;}; struct studentstu[3]={{101,20},{102,19},{103,18}},*p=stu;
struct student{ int age; char num[8];};struct student stu[3]={{20,\200401\},{21,\200402\},{19,\200403\}};struct student *p=stu;以下选项中引用错误的是___ __。
有以下程序: include<stdio.h> struct tt {int x;struct tt*y;}*p; struct tt a[4]={20,a+1,15,a+2,30,a+3,17,a} main() { int i; p=a; for(i=1;i<=2;i++){printf("%d",p->x);p=P->y;} } 程序的运行结果是()。
已知有结构体定义: struct student { int num; char name[20] ; char sex ; int age ; float score; char addr[30] ; } stu [ 2 ] ; 则对 stu 数组可以进行以下初始化: stu [ 2 ]= {{10101 , "LiLin" , ’M’ , 18 , 87.5 , "103 BeijingRoa
有如下程序 include<stdio.h>struct group { int first, second, third; }; struct group get_min_max_sum(); } 程序运行后的输出结果是
有以下程序 struct STU {char num[10];float score[3];}; main() {stmct STU s[3]={{“20021”,90,95,85}, {“20022”,95,80,75}, {“20023”,100,95,90}},*p=s; int i;float sum=0; for(i=0;i<3;i++) sum=sum+p->score[i]; printf(“%6.2f\n”,sum); } 程序运行后的输出结果是
有以下程序: 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;} 程序运行后的输出结果是()。
程序: include <stdio.h> include <string.h> typedef struct{char name[9];char sex;float score[2]}STU; STU f(STU A) {STU b={"Zhao",&39;m&39;,85.0,90.0}; int i; strcpy(a.name,b.namC) ; a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=b.score[i]; return a; } main() {STU c={"Qian",&39;f&39;,95.0,92.0},d; d=f(C) ; pintf("%s,%c,%2.of.%2.of\n",d.name,d.sex,d.score[0],&score[1]); } 程序的运行结果是()。
已知对学生记录的描述为: struct student { int num; char name[20],sex; struct{ int year,month,day; }birthday; } struct student stu; 设变量stu中的“生日”是“1995年11月12日”,对“birthday”正确赋值的程序是______。
有以下程序 include<stdio.h>include<string.h>typedef struct stu { char name[10]; char gender; int score; } STU; void f(); } 程序的运行结果是
有以下程序: include include struct A {int a;char b[10];double C;); struct A f(struct A t
有以下程序: include struct stu { int num;char name[l0];int age;}; void fun(struct stu*p)
有以下程序: 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