Showing posts with label multidimensional arrays. Show all posts
Showing posts with label multidimensional arrays. Show all posts

Saturday, May 10, 2008

Arrays with in structures

Arrays within structures

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.

Copyright

Copyright © 2008 C Tutorial, All rights are reserved