enum

Enumerated data types

 

Used to define a list of integer constants

Compile & run:

Stoner is at position 2

 

Like arrays, the first position starts from ZERO.

 

Other integer values can be assigned:

Compile & run:

Pedrosa has an integer value of 63

 

 

If left unitialised each would have a unique value

Leave a Reply