题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-20 23:17:38

[单项选择]#include<stdio.h>
typedef struct abc
int a,b,c;

main( )
struct abe s[2]=1,2,3),4,5,6;
int t=-s[0].a+s[1].b;
printf("%d/n",t);

更多"#include<stdio.h> typedef struct "的相关试题:

[简答题]#include<stdio.h> typedef struct abc {int a,b,c; }; main( ) {struct abe s[2]={{1,2,3),{4,5,6}}; int t=-s[0].a+s[1].b; printf("%d/n",t); }
[单项选择]有以下程序: #include <stdio.h> typedef struct { int b, p; }A; void f(A c)/* 注意:c是结构变量名*/ { int j; c.b+=1; c.p+=2; } main( ) { int i; A a={1, 2}; f(a); printf("%d, %d/n", a.b, a.P); } 程序运行后的输出结果是______。
A. 2, 4
B. 1, 2
C. 1, 4
D. 2, 3
[填空题]

有以下程序
#include<stdio.h>
typedef struct
{int num;double s;}REC;
void funl(REC x){x.num=23;x.s=88.5;}
main( )
{ REC a=<16,90.0};
funl (A) ;
printf("%d/n",a.mum);
}
程序运行后的输出结果是______。


[单项选择]有以下程序 #include #include typedef struct {char name[9]; char sex; int score[2]; } STU; STU f(STU a) { STU b={"Zhao",’m’,85,90}; int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=b. score[i]; return a; } main( ) { STU c={"Qian",’f’,95,92}, d; d=f(c); printf("%s,%c,%d,%d,",d.name, d.sex, d.score[0], d.score[1]); printf("%s,%c,%d,%d/n",c.name, c.sex, c.score[0], c.score[1]); } 程序运行后的输出结果是_______。
A. Zhao,m,85,90,Qian,f,95,92
B. Zhao,m,85,90, Zhao,m,85,90
C. Qian,f,95,92, Qian,f,95,92
D. Qian,f,95,92, Zhao,m,85,90
[单项选择]有以程序
#include
#include
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,92
B. Qian,m,85,90
C. Zhao,f,95,92
D. Zhao,m,85,90
[填空题]有以下程序:
#include<stdio.h>
typedef struct
int num;double s;)REC;
void funl(REC x)x.num=23;x.s=88.5;
main( )
REC a=16,90.0);
fun1(a);
printf("%d/n",a.num);

程序运行后的输出结果是______。
[单项选择]下面程序运行后的输出结果是()。
struct abc

int a,b,c;

main( )

struct abc s[2]=1,2,3,4,5,6;
int t=-s[0].a+s[1].b;
printf("%d/n",t);

A. 5
B. 6
C. 7
D. 8
[单项选择]下面程序运行后的输出结果是______。
struct abc

int a,b,c;

main( )

struct abc s [2]=1,2,3,4,5,6;
int t=-s[0].a+s[1].b;
printf("%d/n",t);

A. 5
B. 6
C. 7
D. 8
[填空题]函数f( )定义如下,该函数返回值的数据类型是______。
struct ABC int a;int b;int c;;
struct ABC *f(struct ABC abc[2])
return (abc);
[填空题]有以下程序 #include<stdio.h> typedef struct { int num;double s; }REC; void funl(REC *x) { x->num=23;x->s=88.5; } void main( ) { REC a={16,90.0}; fun1(&a); printf("%d/n",a.num); } 程序运行后的输出结果是______。
[填空题]有以下程序
#include<stdio.h>
typedef struct

int num;double s;
REC;
void funl(REC *x)

x->num=23;x->s=88.5;

void main( )

REC a=16,90.0;
fun1(&a);
printf("%d/n",a.num);

程序运行后的输出结果是______。
[单项选择]struct st
int i;int j;;
main( )
struct st m[3]=10,1,20,2,30,3,*p;
p=m;
printf("%d/n",(*++p).j);

[填空题]设有说明;
struct DATE int year; int month; int day;;
请写出一条定义语句,该语句定义d为上述结构体类型变量,并同时为其成员year、month、day依次赋初值2006、10、1: 【19】
[填空题]设有说明
struct DATE int year;int month;int day;;
请写出一条定义语句,该语句定义d为上述结构体类型变量,并同时为其成员year、month、day依次赋初值2006、10、1:______。
[填空题]已有定义如下:
struct node
int data;
struct node *next;
*p;
以下语句调用malloc函数,使指针p指向一个具有struct node类型的动态存储空间。请填空。
p=(struct node *)malloc( 【10】 );
[单项选择]若有以下程序段:
struct st
int n;
int*m:

int a=2,b=3,c=5;
struct st s[3]=(101,&a,102,&c,103,&b);
main( )
struct st*p;
p=s;

则以下表达式中值为5的是()。
A. (*p).m
B. *(p+1)->m
C. *(p++)->n
D. (p++)(*m)

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码