Hi! I need help with this C++ assignment! Thanks The next 8 questions are based
ID: 666279 • Letter: H
Question
Hi! I need help with this C++ assignment! Thanks
The next 8 questions are based upon the following material:
struct nameType
{
string first;
string last;
};
struct courseType
{
string courseName;
int callNum;
int credits;
char grade;
};
struct studentType
{
nameType name;
double gpa;
courseType course;
};
//**********************************************
//Variables defined using the above defined structs
studentType student;
studentType classList[100];
courseType course;
nameType name;
//************************************************
These are the questions:
1.The following is a valid C++ statement: student.course.callNum = 123; true or false?
2. The following is a valid C++ statement:cin >> student.name; true or false?
3.The following is a valid C++ statement: classList[0] = name; true or false?
4. The following is a valid C++ statement:classList[1].gpa = 3.45; true or false?
5. The following is a valid C++ statement: string n1 = classList[15].name.first; true or false?
6. The following is a valid C++ statement: student.name = name; true or false?
7. The following is a valid C++ statement: cout << classList[10] << endl; true or false?
8. The following is a valid C++ program segment:
true or false?
PLEASE HELP!
Explanation / Answer
1.false
2.true
3.true
4.true
5.true
6.true
7.true
8.false
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.