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

Please help me answer these C#, Thanks 1)The most appropriate sentinel value tha

ID: 3695400 • Letter: P

Question

Please help me answer these C#, Thanks

1)The most appropriate sentinel value that might be selected for month of the year is ____.

A)0

B)1

C)6

D)12

2)Which of the following is an advantage of a sentinel-controlled loop?

A)The number of iterations does not have to be known.

B)An extreme or dummy value can be entered.

C)The loop is always performed at least one time.

D)It could be used with the while form of the loop.

3) for (int i = 0; i < 10; i++)

{

Console.WriteLine(“counter ” + i);

}

The variable i defined in the program segment above ____.

A)is out of scope when the loop terminates

B)creates an error because it is changed in the update portion

C)would have a value of 10 if it were printed on the outside of the loop

D)can be displayed prior to the loop program statements

4)for (int i = 0; i < 5; i++)

Console.Write(i + “ ”);

The conditional expression used with the for statement ____.

A)must involve a counter

B)must evaluate to false in order for the loop body to be executed

C)is evaluates after the loop body is performed once

D)is written following the first semicolon

5)The only posttest loop structure available in C# is _____.

A)while

B)for

C)do...while

D)foreach

6) int loopVariable = 0;

do

{

Console.WriteLine(“Count = {0:}“, ++loopVariable);

}while (loopVariable < 5);

How many times will be loop body be executed if the conditional expression is changed to (loopVariable == 5)?

A)0

B)4

C)5

D)6

Explanation / Answer

1)   A)0

2) A)The number of iterations does not have to be known.

3) A) is out of scope when the loop terminates

4 D)is written following the first semicolon

5 C)do...while

6) B 4

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