
Keith B. answered 10/01/15
Tutor
4.6
(22)
Software Engineer and Math Geek
1. Make today's month represent February
Make a variable s of type struct dob. Set the month member to be 2. I recommend using a #define FEBRUARY 2, as "magic numbers" are not good program practice. structure and class members are accessed using the '.' operator.
2. Write a statement that makes s's name be Natalie Portman
A. Similar to the previous problem; create a struct variable s of type student and set s.name
3. & 4. are similar assignment statements.
5. This can be done with simple for loop to walk through the student member element, grades. Have a new variable (I suggest using float, as you'll be calculating average) to sum up the values.