Given the declaration of the Name type: struct Name { string first; string middl
ID: 3615042 • Letter: G
Question
Given the declaration of the Name type:
struct Name
{
string first;
string middle;
string last;
};
Name yourName;
Name myName;
and the following declarations:
struct studentRecord
{
Name studentName;
Name teacherName;
int gradeNumber;
string grades;
}
studentRecord sally;
How would you assign the name Sally Ellen Strong to thestudentName field of variablesally?
How would you assign the grade number 7 to that field ofsally?
How would you assign the fourth letter from thegrades field to char variablespring?
Explanation / Answer
please rate - thanks How would you assign the name Sally Ellen Strong to thestudentName field of variablesally? sally.studentName.first=Sally; sally.studentName.middle=Ellen; sally.studentName.last=Stong; How would you assign thegrade number 7 to that field of sally? sally.gradeNumber=7; How would you assign the fourth letter from thegrades field to char variablespring? spring=sally.grades[3];
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.