C ++ Using the following code:   enum GradeLevel { FRESHMAN, SOPHMORE, JUNIOR, SENIOR };   struct Student {     string      first;     string      middle;     string      last;     GradeLevel  year;     float       GPA; };   Student A0012; // Student ID A0012 Student A0013; // Student ID A0013   A0012.first = "Bjarne"; A0012.last = "Stroustrup"; A0012.GPA = 3.56; A0013 = A0012; A0012.year = SENIOR; A0013.middle = "C++"; A0013.year = static_cast(A0012.year - 2); A0013.GPA = floor(A0012.GPA); // floor() rounds down to whole number A0012.middle = A0013.middle.at(0) + ".";   What are the contents of the Student variables after this code has executed? Use the chart provided. Who is Bjarne Stroustrup?

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter2: Getting Started With Css: Designing A Website For A Fitness Club
Section2.3: Visual Overview: Pseudo Elements And Classes
Problem 7QC
icon
Related questions
Question

C ++

Using the following code:

 

enum GradeLevel { FRESHMAN, SOPHMORE, JUNIOR, SENIOR };

 

struct Student

{

    string      first;

    string      middle;

    string      last;

    GradeLevel  year;

    float       GPA;

};

 

Student A0012; // Student ID A0012

Student A0013; // Student ID A0013

 

A0012.first = "Bjarne";

A0012.last = "Stroustrup";

A0012.GPA = 3.56;

A0013 = A0012;

A0012.year = SENIOR;

A0013.middle = "C++";

A0013.year = static_cast<GradeLevels>(A0012.year - 2);

A0013.GPA = floor(A0012.GPA); // floor() rounds down to whole number

A0012.middle = A0013.middle.at(0) + ".";

 

What are the contents of the Student variables after this code has executed? Use the chart provided. Who is Bjarne Stroustrup?

 

Field
string first
string middle
string last
Grade Level year
float GPA
A0012
A0013
Transcribed Image Text:Field string first string middle string last Grade Level year float GPA A0012 A0013
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning