Question: What is the output of the following code: #include using namespace std; struct student _ t { string name; int grade; } void curveGrade (

What is the output of the following code:
#include
using namespace std;
struct student_t {
string name;
int grade;
}
void curveGrade(student_t& s, int points);
int main (){
student_t student1={"Joe",75};
curveGrade(student1,5);
cout << student1.name <<" got a "<< student1.grade << endl;
}
void curveGrade(student_t& s, int points){
s.grade += points;
}
Group of answer choices
Joe got a 75
Error
Joe got a 80
Joe got a 70

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!