Explain the difference between a pretest loop and a posttest loop.
What will be an ideal response?
In a pretest loop, the condition appears at the beginning of the loop. The condition will be evaluated before the instructions within the loop are processed. Depending on the result of the evaluation, the instructions in a pretest loop may never be processed. In a posttest loop, the condition appears at the end of the loop. The condition will be evaluated after the instructions within the loop are processed. The instructions within a posttest loop will always be processed at least once.
You might also like to view...
Deserialize returns a reference of type:
a) object which must be cast to the appropriate type to manipulate the object b) the type that the object was originally c) Deserialized which must be cast to the appropriate type to manipulate the object d) None of the above
A collision occurs when
A) objects whose class types are not related through inheritance have the same hashcode B) objects instantiated from different generic types have the same hashcode C) objects whose class types are not related through inheritance have hashcodes one of which divides the other D) objects whose values are not equal have the same hash code
Which of the following is FALSE about page breaks?
A) When inserting a manual page break, the new page always starts with single spacing and no indents. B) When inserting a manual page break, the new page retains the formatting of the previous. C) A manual page break forces a page to end at the insertion point location. D) A page break indicator shows where a manual page break was inserted.
What is the function of the laser in a laser printer?
A) It charges the paper so it will attract toner. B) It creates an image of the page on the drum. C) It cleans the drum before a page is printed. D) It heats up the toner so it adheres to the page.