> For the complete documentation index, see [llms.txt](https://fashaun.gitbook.io/dev-c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fashaun.gitbook.io/dev-c/struct.md).

# Struct

struct Ball{

char color\[10];

double radius;

};

**宣告並設定**

struct Ball ball1 = {"red", 5.0};

**宣告再設定**

宣告 and instantiation (實例化)

`typedef`定義`struct`的名稱，如此一來，宣告並產生實例時，就不用再寫`struct`關鍵字

**Struct 可以直接用來 assign 複製本身值給另外一個 struct**

同理

Struct 若用在 function 引數傳遞 , 行為同樣是複製
