有以下程序#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 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;
设有以下说明语句,则下面叙述中正确的是( )。typedef struct { int n; char ch[8]; }PER;
以下程序的输出是( ) 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);}程序运行后的输出结果是()
以下代码将定义结构体类型,并定义结构体变量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;以下选项中引用错误的是___ __。
根据下列的定义,能打印出字母P的语句是()。 struct stu { char name[10]; iht age; }; struct stu s[10]={"John",11, "Paul", 12, "Mary", 11, "adam",12 };
若有以下说明和语句:sturct st { int n;char *ch;}; struct st a[3]={5, "abc",7, "def",9, "ghk"},*p=a;则值为6的表达式是()。A)p++->n B)p->n++C)(*p).n++ D)++p->n
已知有结构体定义: 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
有以下程序 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); } 程序运行后的输出结果是
若有以下说明和语句: struct st{int n;char *ch;}; struct st a[3]={5,"abc",7,"def",9,"ghk"},*p=a; 则值为6的表达式是______。
有以下程序: 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(); } 程序的运行结果是
变量a所占的内存字节数是________。() struct stu { char name[20]; long int n; int score[4]; }
有以下程序: 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 struct STU{char name[9];char sex;int score[2];}; void f(struct STU 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