Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started