Identify the lines containing syntax errors in the following

Identify the lines containing syntax errors in the following code segment. Assume all necessary libraries have been included. Select all that apply. A struct MidwayGame float price = 3.00, prize-cost = 1.00; D int players, attempts: F MidwayGame *BBallToss = new MidwayGame, WaterSquirter; Answers: A

Solution

Line C: Structure variables can\'t be instantiation, because initially it can\'t have memory to store,

Structure give a memory only when instantiate the structure variable

example: struct example {

int var;

};

this structure can\'t have memory

typedef struct example ex; --> now unique memory allocated for structure

Line E: Structure must be ends with semicolon

Line F: pointer variable can\'t be instantiate with new operator

struct MidwayGate *BBallToss; --> is correct, it gives new memory for MidwayGate structure

  

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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site