当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

有如下程序段struct abc{ int a b c s;};main(){ struct abc s[2]={{1 2 3} {4 5 6}}; int t;


有如下程序段struct abc{ int a, b, c, s;};main(){ struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t);}程序运行后输出的结果是

A、5

B、6

C、7

D、8

参考答案
您可能感兴趣的试题
  • 若程序中有以下说明和定义。struct abc{ int x;char y;}struct abc s1,s2;则会发生的情况是A.编

  • 有如下程序段struct abc{ int a, b, c, s;};main(){ struct abc s[2]={{1,2,3},{4,5,6}}; int t;

  • 有如下程序段#include "stdio.h"typedef struct aa{ int a; struct aa *next;} M;void set(M *

  • 下列程序的输出结果是()struct abc{ int a b c;};main(){ struct abc s[2]={{1 2 3} {4 5 6}};in

  • 有以下程序段struct st{int x;int *y;)*pt;int a[]={l 2} b[]={3 4};struct st c[2]={10 a

  • 若有以下程序段:struct st{int n;int*m:};int a=2 b=3 c=5;struct st s[3]=({101 &a} {102 &