首页
›
答案
›
题库
›
知到智慧树
›
未分类
以下结构体类型说明和变量定义中正确的是()。
以下结构体类型说明和变量定义中正确的是()。
A.typedef struct {int n; char c;} REC; REC x,y;
B.struct REC; {int n; char c;}; REC x,y;
C.typedef struct REC ; {int n=0; char c=’A’; } x,y;
D.struct {int n; char c; } REC x,y;
正确答案:A
标签:
C语言编程新思路
变量
定义
上一条:
设有以下说明语句 struct stu { int a; float b; }stutype; 则以下叙述不正确的是()。
下一条:
下面程序的运行结果是()。 struct st { int n; int a[20]; }; void f(int *a, int n) { int i; for(i=0;i<n;i++) a+=I; } int main() { int i; struct st x={10,{2,3,1,6,8,7,5,4,10,9}}; f(x.a, x.n); for(i=0;i<s.n;i++) printf(”%d,”,x.a); }