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

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

19、变量a所占的内存字节数为______(假设整型int为4字节) struct stu{ char name[20]; long int n; int score[4]; }a;

A.28

B.30

C.32

D.46


参考答案和解析
32
更多 “19、变量a所占的内存字节数为______(假设整型int为4字节) struct stu{ char name[20]; long int n; int score[4]; }a;A.28B.30C.32D.46” 相关考题
考题 下列语句段中,正确的是( )。A.struct{int x;float y;int a[2];unsigned b[3];char name[10];};B.struct stu{unsigned a[3];unsigned b[4];}x;int*p=x.a;C.struct stu{int a;float x[4];}y={1,1.0};float data=y.x;D.struct nd{int a,b;unsigned c[2]=5;};

考题 有以下程序:#includestruct stu { int num;char name[10];int age;}void fun(struct stu*p){ printf(%s\n,(*p).name);}main{ struct stu students[3]={{9801,Zhang.20}, {9802,Wang,19},{9803,Zhao,1 8}}fun(students+2); }输出的结果是( )。A.ZhangB.ZhaoC.WangD.18

考题 变量a所占内存字节数是______。 union U { char st[4]; int i; long 1; }; struct A { int c; union U u; }a;A.4B.5C.6D.8

考题 有以下程序: include struct STU (char name[10]; int num; }; 有以下程序: #include <string.h> struct STU (char name[10]; int num; }; void f(char *name, int num) {struct STU s[2]={{"SunDan",20044}.{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main() {struct STU s[2]={{"YangSall",20041},{"LiSiGao",20042}},*p;p=s[1]; f(p->name,p->num); printf("%s%d\n",p->name,p->num); } 程序运行后的输出结果是 ______。A.SunDan 20042B.SunDan 20044C.LiSiGuo 20042D.YangSan 20041

考题 假定int类型变量占用两个字节,其有定义int x[10] ={0,2,4};,则数组x在内存中所占字节数是A.3B.6C.10D.20

考题 在C语言系统中,假设int类型数据占两个字节,则double、long、unsigned int、char类型数据所占字节数分别为( )。A.8,2,4,1B.2,8,4,1C.4,2,8,1D.8,4,2,1

考题 假定int类型变量占用两个字节,若有定义:int x[10]={0,2,4);,则数组x在内存中所占字节数是______。A.3B.6C.10D.20

考题 有以下程序#include stdio.hstruct stu{ int num; char name [10];int age;};Void fun(struct stu *p){ printf("%s\n,p-name);}main( ){ struct stu x[3]={ {01,”Zhang”,20},{02, ” Wang”,19},{03, ”zhao”,18} };fun(x+2);}程序运行后的输出结果是A)ZhangB)ZhaoC)WangD)19

考题 变量a所占的内存字节数是 ______。A.4B.5C.6D.8 union U { char st[4]; int i; long l; }; Struct A{ int c; union U u; }a;

考题 Tubro C中long int类型变量所占的字节数是______。A.1B.2C.3D.4

考题 若有以下结构类型说明和变量定义,则变量a在内存中所占字节数是struct stud{ char num[6]; int s[4]; double ave;}a,*p;

考题 有以下程序: #includestdio.h struct stu { int num;char name[l0];int age;}; void fun(struct stu*p) { printf("%s\n",p-name);} main( ) { struct stu x[3]={{01,"Zhang",20),{02,"Wang",l9},{03,"Zha0",l8}}; fun(x+2); } 程序运行后的输出结果是( )。A.ZhangB.ZhaoC.WangD.19

考题 有以下程序: #includestdio.h struct stu { int num; char name[10]: int age;} void fun(struct stu*p) {printf("%s\n",(*p).name);} the main { struct stu students[3]={{9801,"Zhang".20}, {9802,"Wang",19},{9803,"Zhao",1 8}} fun(students+2); } 输出的结果是( )。A. ZhangB.ZhaoC.WangD.18

考题 有以下程序:include struct STU{char name[10]; int num; int Score;};main(){struct 有以下程序: #include <stdio.h> struct STU { char name[10]; int num; int Score; }; main() { struct STU s[5]={{"YangSan",20041,703},{"LiSiGuo",20042,580}, {"WangYin",20043,680},{"SunDan",20044,550}, {"Penghua",20045,537}}, *p[5],*t; int i,j; for(i=0;i<5;i++) p[i]=s[i]; for(i=0;i<4;i++) for(j=i+1;j<5;j++) if(p[i]->Score>p[j]->Score) { t=p[i];p[i]=p[j];p[j]=t;} printf("%d%d\n",s[1].Score,p[1]->Score); } 执行后的输出结果是( )。A.550 550B.680 680C.580 550D.580 680

考题 以下程序的输出结果是______。includestruct stu{int num; char name[10]; int age;};v 以下程序的输出结果是______。#include<stdio.h>struct stu{ int num; char name[10]; int age;};void fun(struct stu*p){ printf("%s\n",(*p).name);}main(){ struct stu students[3]={ {9801,"Zhang",20}, { 9802,"Wang",19}, { 9803,"Zhao",18} }; fun(students+2);}A.ZhangB.ZhaoC.WangD.18

考题 下列语句段中,正确的是( )。A.street { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p= x.a;C.stmct stu { int a; float x[4]; }y={1,1.0}; float data=y.x;D.struct nd { int a,b; unsigned c[2]=5; };

考题 下列关于结构型变量的定义语句中,错误的是( )A.typedef struct CCCB.define GGG struct { char name[20];GGG CCC { char name[20]; int age; int age; }GGG; }; GGG abc ; GGG CCC abc;C.structD.struct { char name[20]; { char name[20]; int age; int age; }ccc; }abc; CCC abc;

考题 下列语句段中,正确的是( )。A.struct { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p= x.a;C.street stu { int a; float x[4]; }y={1,1.0}; float data=y.x;D.struct nd {int a,b; unsigned c[2]=5; };

考题 在C语言中(以16位PC机为例),一个char数据在内存中所占字节数为(),其数值范围为();一个int数据在内存中所占字节数为(),其数值范围为();一个long数据在内存中所占字节数为(),其数值范围为();一个float数据在内存中所占字节数为(),其数值范围为()。

考题 数据结构里,struct student { char name[20]; char sex[10]; int age; int score; }; 定义结构体后,定义变量、数组赋值正确的是()。A、struct student s={"张三","男",18,100};B、struct student stu[3]={{"张三","男",18,100},{"李四","男",19,90},{"王五","男",23,97}};C、struct student s={"李四";"女";18;100};D、struct student stu[3]={{"张三",18,"男",100},{"李四",19,"男",90},{"王五",23,"男",97}};

考题 假定int类型变量占用4个字节,若有定义:  int[] x=new int[10]{0,2,4,4,5,6,7,8,9,10};  则数组x在内存中所占字节数是()A、 10B、 20C、 40D、 80

考题 假定int类型变量占用两个字节,若有定义:int[]x=new int[10]{0,2,4,4,5,6,7,8,9,10};则数组x在内存中所占字节数是()。A、6B、20C、40D、80

考题 假设int型变量占两个字节的存储单元,若有定义intx[10]={0,2,4};,则数组x在内存中所占字节数为()。A、3B、6C、10D、20

考题 设有以下结构类型说明和变量定义,则变量a在内存所占字节数是().   struct stud { char num[8]; int s[4]; double ave; } a,*p; 

考题 单选题假定int类型变量占用4个字节,若有定义:  int[] x=new int[10]{0,2,4,4,5,6,7,8,9,10};  则数组x在内存中所占字节数是()A  10B  20C  40D  80

考题 单选题假定int类型变量占用两个字节,若有定义:int[]x=new int[10]{0,2,4,4,5,6,7,8,9,10};则数组x在内存中所占字节数是()。A 6B 20C 40D 80

考题 单选题有以下函数:#include struct stu{ int num; char name[10]; int age;};void fun(struct stu *p){ printf(%s, p-name);}main(){ struct stu x[3] = {{01,Zhang,20}, {02,Wang,19}, {03,Zhao,18}}; fun(x+2);}程序运行后的输出结果是(  )。A ZhangB ZhaoC WangD 19

考题 填空题设有以下结构类型说明和变量定义,则变量a在内存所占字节数是().   struct stud { char num[8]; int s[4]; double ave; } a,*p;