Answer to Question #258611 in C++ for Dion Martins

Question #258611

1.1 A variable declared within the for-loop has _________ scope.

a. local

b. global

c. block

d. private

1.2 Which of the following statements is equivalent to the following: while (value < 18)

a. while (value <= 18)

b. while (value >=18)

c. while (! (value > 18) )

d. while (value < 17)

1.3 Which of the following equations will deduct a discount of 7.5% from an amount?

a. amount = amount – 7.5%

b. amount = amount * .925;

c. amount = amount – (amount * 0.075)

d. amount = amount – amount * 0.75;

1.4 Which of the following statement is equivalent to?

result *= a + 5;

a. result = result * a + 5;

b. result = result * (a + 5);

c. result = (result * a ) + 5

d. results = a+ 5;



1
Expert's answer
2021-10-29T07:19:50-0400


SOLUTION TO THE ABOVE QUESTIONS


1.1 A variable declared within the for-loop has _________ scope.

a. local

b. global

c. block

d. private


ANSWER.

c. block


1.2 Which of the following statements is equivalent to the following: while (value < 18)

a. while (value <= 18)

b. while (value >=18)

c. while (! (value > 18) )

d. while (value < 17)


ANSWER.

There is no answer in the given choices.

The statement equivalent to while (value < 18) is while (! (value >= 18) )


1.3 Which of the following equations will deduct a discount of 7.5% from an amount?

a. amount = amount – 7.5%

b. amount = amount * .925;

c. amount = amount – (amount * 0.075)

d. amount = amount – amount * 0.75;


ANSWER.

c. amount = amount – (amount * 0.075)


1.4 Which of the following statement is equivalent to?

result *= a + 5;

a. result = result * a + 5;

b. result = result * (a + 5);

c. result = (result * a ) + 5

d. results = a+ 5;


ANSWER.

b. result = result * (a + 5);


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS