Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I am having difficulties understanding these C++ problem. Can anyone explain to me what is correct? 1.) Identify the lines containing syntax errors in

Hello I am having difficulties understanding these C++ problem. Can anyone explain to me what is correct?

1.) Identify the lines containing syntax errors in the following code segment. Assume all necessary libraries have been included. Select all that apply.

struct HalfwayGame

{

float price1 = 2.00, prize_cost = 1.00;

int player_count, tries;

}

HalfwayGame *BBallToss = new MidwayGame;

HalfwayGame WaterSquirter;

*BBallToss = &WaterSquirter;

Possible Answer Choices:

a.) struct header

b.) initialization of float variables

c.) declaration of integer variables

d.) struct brackets

e.) declaration and initialization of structure pointer

f.) declaration of structure variable

g.) assignment to structure pointer

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2.) Given the following array, which of the statements below creates a pointer that should be movable, but cannot modify the data and is also initialized to point at the 10th element of the array?

string Fastwave_Array[50];

Possible Answers:

a.) const string *guest = *(Fastwave_Array + 9);

b.) const string * const guest = Fastwave_Array+ 9;

c.) const *guest = *(Fastwave_Array + 9);

d.) const string *guest = Fastwave_Array + 9;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

Students also viewed these Databases questions