struct Name { string first; string middle; string last; }; Name yourName; Name m
ID: 3615006 • Letter: S
Question
struct Name{
string first;
string middle;
string last;
};
Name yourName;
Name myName;
Given the declaration of the Name type above, andthe 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
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.