It's been a long time since I've been on a book with garlic.
Wrote a program to verify what the garlic Guest said
#include <stdio.h>typedefstructStudent {intAge ; floatheight; } student;structstuent {intAge ; floatheight; };structStudent gavin_belson={ About,165.4};//The first way of declaringintMain () {structStudent gregory={Wuyi,175.4};//second way of declaringStudent Amy, sheldon= { A,193.2}; Amy.age= +; Amy.height =172.2;//Third Way of declaringprintf"Amy is:%d%f\n", Amy.age, amy.height); printf ("Sheldon is:%d%f\n", Sheldon.age, sheldon.height); printf ("Gavin_belson is:%d%f\n", Gavin_belson.age, gavin_belson.height); printf ("Gregory is:%d%f\n", Gregory.age, gregory.height); return 0;}
Structs can be declared and defined outside of main, or they can be defined externally using TypeDef, or externally declared internally
The last student of a typedef can be followed by a square of curly braces, which can be identified by the compiler.
"C" structure (1)