⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 struct.c

📁 早期freebsd实现
💻 C
字号:
/* * Test for C structures. *//* * A simple nested structure. */struct simple {    int a;    char b;    double c;    struct {	int a;	char b;	double c;    } d;    int e;    char f;    double g;} simple;/* * Mutually recursive structures, using typedefs. */typedef struct first *First;typedef struct second *Second;struct second {    int b;    char c;};struct first {    int a;    Second p;};UseRecurStructs(){    struct first b, *p;    struct second list;    p = &b;    b.a = 3;    b.p = &list;    b.p->b = 4;    b.p->c = 'c';}/* * Functions returning structures. */struct simple f(x)int x;{    struct simple s;    s.a = x;    s.g = 3.14;    return s;}main(){    struct simple x;    struct simple *y;    UseRecurStructs();    x = f(3);    y = &x;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -