answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What are the advantages and disadvantages of a pretest and posttest loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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. :)


What is counted pretest loop?

While loop is counted as pretested loop.


Is the for loop a pretest type of loop?

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.


What are the disadvantages of closed loop systems?

its costly than open loop system and bulky, too.


What are the disadvantages of the While Loop?

With loops, your program is slower.


Disadvantages of Closed Loop control?

A closed loop system for the purpose of feeding back the output signal to the input side requires sophisticated sensors, which make this scheme expensive to implement. Initial tuning of the system is also difficult(feedback serves the purpose of fine tuning).


Advantages of open loop control system?

The open loop system is simple and economicaleasier to constructstable


What are the advantages of closed loop control system?

stability and repeatability


What are constructs in c plus plus?

C++ has 4 basic constructs:SequentialSelectionRepetitionRoutine invocationSequential ConstructSequential constructs determine which instruction will be executed next. In most languages the default will be the instruction that immediately follows the current instruction. However, most languages include jump statements which can be used to alter the execution sequence. In C++, jump statements employ the goto, return, break and continue keywords.Selection ConstructSelection constructs include if-else and case statements (some languages also employ pattern matching, but not C++). These are primarily used to determine which statement will be executed from a list of alternate statements. If-else statements allow us to select one statement from a maximum of two statements based upon the evaluation of an expression. We can also nest if-else statements to cater for additional alternates. However, if the expression to be evaluated is the same for each alternate then it is usually more succinct to use a case construct rather than repeatedly re-evaluating the same expression. In C++, case statements may include goto, return and break statements to determine where an alternate ends, thus allowing execution to fall-through more than one case where desired.Repetition ConstructRepetition constructs involve loop statements, such as for, while and do-while, as well as procedural loops involving goto statements, where a simple or compound statement may be iterated a fixed number of times or a variable number of times. All loops must have at least one exit point, which can either be pretest or posttest. An exit point is a conditional expression that evaluates true or false. So long as the condition remains true, the body of the loop will continue iterate. With pretest loops, the condition is evaluated before each iteration while posttest loops evaluate the condition at the end of each iteration. The only real difference is that posttest is guaranteed to iterate at least once whereas pretest may not iterate at all. In C++, for and while loops are pretest and do-while is posttest. Procedural goto loops are always posttest. Although all arguments in a for loop are optional, the conditional expression is always true unless an expression is explicitly stated. Where a condition is always true, the loop is said to be variable length and infinite. However, in order to be a valid loop, the body of an infinite loop must contain at least once exit condition (which must include a break, return or goto statement that exits the loop). C++ loops may also use the continue keyword to start a new iteration if the condition (whether pretest or postest) remains true.Routine Invocation ConstructRoutine invocation construct describes procedure calls (or function calls). Unlike a goto statement that branches off to another section of code, a procedure call returns to the point of the call after invoking the procedure. To achieve this, C++ employs the call stack, pushing the return address onto the stack before invoking the named procedure. When the procedure has completed its task, the return address is popped from the stack and control is returned to that address. The call stack can also be used to pass arguments to and from the procedure, as well as returning a single value from the procedure (the return value). This mechanism allows procedures to call other procedures without losing track of the return paths. Procedures may also call themselves, recursively, using the call stack to maintain the variable state of each instance of the procedure.


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


What are the advantages of Murray loop test compared to Varley loop test?

Murry for long underground cables test but varley usually for short distance.


Advantages of The Open Loop control?

Doing sex is an example of open loop so in this system u cannot control the amount of sperms entering your partner