Question: dev C++ Question 5 (20 Marks) a) After executing the following program segment, what is the value of the variables and output of the program?

dev C++  dev C++ Question 5 (20 Marks) a) After executing the following
program segment, what is the value of the variables and output of
the program? Write your answer in Table 5. (5 marks) 1 2.

Question 5 (20 Marks) a) After executing the following program segment, what is the value of the variables and output of the program? Write your answer in Table 5. (5 marks) 1 2. 3 4 struct Play fint score, bonus; l; union value tint P, qit; enum level (easy, medium, hard); 6 8 9 10 Play playeri - (10, 15), player2, player 3; value val; level game medium; *+player1.score; player2 - player1 player2 bonus ** 5; player 3 player2; player 2.score +- 12: player 3. score + (int) game; val.p playerl. score; val.q-playeri. bonus 12 13 2 15 16 17 18 cout #include using namespace std; 4 o un int main() /**) Declare structure named Point with 2 members of type float named x and y (1.5 marks) 7 8 9 10 11 12 13 1) Declare structure named Line with 2 members of type Point named A and B, and one member of type float named length (2 mrks) const int SIZE - 57 1/111) Define array named in of type Line with size 5 (1 mark) 15 16 12 18 19 20 22 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 7/Get input data for (int 10; I

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 Databases Questions!