Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

When calculating a baseball players average, the average variable should be defi

ID: 3596588 • Letter: W

Question

When calculating a baseball players average, the average variable should be defined as a ____________.

float

int

string

char

Which of the following C++ statements correctly subtracts the number 40 from an int variable named hours, and stores the result in an int variabled named overTimeHours?

hours - 40 = overTimeHours;

overTimeHours = 40 - hours;

40 - hours = overTimeHours;

overTimeHours = hours - 40;

Which of the following input statements is correct?

cin >> total amount;

cin << total amount;

cin >> totalAmount;

cin << totalAmount;

Which of the following statements correctly reserves a named constant named CITY. Use the string literal constant "Dallas" to initialize the memory location.

const string CITY = "Dallas";

string CITY = "Dallas";

const String CITY = "Dallas";

const string CITY = Dallas;

A

float

B

int

C

string

D

char

Explanation / Answer

When calculating a baseball players average, the average variable should be defined as a ____________.

float

int

string

char

Average should be a floating point number

Which of the following C++ statements correctly subtracts the number 40 from an int variable named hours, and stores the result in an int variabled named overTimeHours?

hours - 40 = overTimeHours;

overTimeHours = 40 - hours;

40 - hours = overTimeHours;

overTimeHours = hours - 40;

Which of the following input statements is correct?

cin >> total amount;

cin << total amount;

cin >> totalAmount;

cin << totalAmount;

There should not be any space and cin works with ">>"

Which of the following statements correctly reserves a named constant named CITY. Use the string literal constant "Dallas" to initialize the memory location.

const string CITY = "Dallas";

string CITY = "Dallas";

const String CITY = "Dallas";

const string CITY = Dallas;

A

float

B

int

C

string

D

char

Average should be a floating point number

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote