| Single as multidimensional arrays of type int as float can be defined as structure members. |
| Example: |
| struct marks |
| { |
| int number; |
| float subject[3]; |
| } |
| student [2]; |
| Here the member subject contains three elements, subject[0], subject[1] and subject[2] there elements can be accessed using appropriate subscript. |
| For instance, the name student [1] student [2]; would refer to the marks obtained in the third subject by the secured student. |
If you enjoyed this post, make sure you subscribe to my RSS feed!
Post a Comment