1.1 Which of the following statements is true with regards to the post-test loop?
a. The statement in the body of the loop must be processed at least once.
b. It is not known how many times the body of the statement must be processed.
c. The condition controlling the loop can be tested at the end of body of the statements
d. All of the above
1.2 Which of the following is not true with regards to the pre-test loop?
a. It is possible that the statement inside the body of the pre-test will not execute at all.
b. It is always known how many times the statements inside the body will execute.
c. A sentinel may be used to control the execution of the loop.
d. Once a while loop is entered, the statements within the compound statement are executed as long as the tested condition is true.
1.1 Which of the following statements is true with regards to the post-test loop?
a. The statement in the body of the loop must be processed at least once.
b. It is not known how many times the body of the statement must be processed.
c. The condition controlling the loop can be tested at the end of body of the statements
*d. All of the above
1.2 Which of the following is not true with regards to the pre-test loop?
a. It is possible that the statement inside the body of the pre-test will not execute at all.
*b. It is always known how many times the statements inside the body will execute.
c. A sentinel may be used to control the execution of the loop.
d. Once a while loop is entered, the statements within the compound statement are executed as long as the tested condition is true.
Comments
Leave a comment