answersLogoWhite

0


Best Answer

Pretest loops, such as for-loop, while-loop, execute/evaluate the condition statement first, if the condition is met, then the statements of the loop are executed. If you were referring to the body of the loop being carried out at least once, no, the body will not be touched if the condition fails (pre-test, test BEFORE the [next] execution of the body). But the condition of the loop must have been evaluated at least once.

In contrast to the post-test loops, such as do-while, repeat-until, the condition is evaluated AFTER the [next] execution of the body. It is possible that the condition is never evaluate, and not the entire loop body being executed.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Yes. The loop index is evaluated BEFORE the loop enters each iteration.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

TRUE. They only execute the body when they have determines after EACH ITERATION of the loop that the condition has been satisfied.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is the for loop a pretest type of loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is counted pretest loop?

While loop is counted as pretested loop.


What the difference between pretest loop and posttest loops?

The difference is that pre means before and post means after in Latin so it's tested before or after. :)


The while loop is a type of loop?

Is loop


What is a synonym for pretest?

pretest means a practice test


When was Pretest created?

Pretest was created on 2003-05-13.


Definition of do loop while in visual basic?

There are 3 type of loop 1 is for loop 2 is loop while 3 is loop untile


What type of loop can either increment or decrement the loop control variables value?

Counting Loop


What is a type of loop that opens up towards the radius bone of an arm?

It is a word with 6 letters and is a type of loop None other then the RADIAL loop your welcome


What is a nested loop in java?

A nested loop is a (inner) loop that appears in the loop body of another (outer) loop. The inner or outer loop can be any type: while, do while, or for. For example, the inner loop can be a while loop while an outer loop can be a for loop.


How do you use pretest in a sentence?

The utility of HLA-B27 teating depends on the pretest probability of disease.


How do you use the word pretest in a sentence?

I did well on the test because I did all the recommended pretest questions.


What is an example of a pretest loop?

Well, from my knowledge of pseudocode, a pre-test loop contains the DO WHILE and LOOP functions. So say you want to pour some milk into your cereal for breakfast: DO WHILE cereal_bowl.Full = False Pour_Milk LOOP Basically this is you saying, I am going to pour milk WHILE the bowl is not full. Once the bowl is full you will stop because you checked before your poured (a pre-test). Hope this helps. - The Doctor