I remembered what the second exam question was: define a
to hold single elements from the periodic table, including:
- an int for the atomic number,
- a string for the element's name, and
- an array of 7 ints to hold the number of electrons in each shell
Then write a function
void getElement(Element \*element)
to get the information.
Fairly simple really as long as you document any assumptions, make sure you include at least _some_ error checking, remember to typedef
the struct and remember that since the routine is a void...
we're hurtling into pointers.
Of course talking about this question afterwards, a lot of my peers indicated that they had trouble handling the pointer aspects of the question: they couldn't get a handle on it. (Terrible geek joke, sorry!)
Now I wonder whether the examiner will understand my use of the /\* ARGSUSED \*/