資料來源:C語言 enum 1. enum裡的識別字,會以int的型態,從0開始排列,你也可以給于數值。 2. enum也可以不宣告identifier , 如第二個enum的宣告方法, 可以減少define的使用,enumerator可以是相同的值,如範例中off跟yes都是1。 Result: