Purchase Solution

Pretest and posttest loops

Not what you're looking for?

Ask Custom Question

What is the main difference between posttest and pretest loops?
Give examples of cases, when you will use each of them?
Can you code the same functionality using any of them?
To which of these two categories would you place the "for loop"?

Purchase this Solution

Solution Summary

Solution makes extensive use of examples and reasoning for better and easier grasp on the concept.

Solution Preview

The main difference between posttest and pretest loops is when the loop termination condition is tested. In case of posttest loops it is after the loop body execution, and in case of pretest loops it is before the loop body execution.

We will use posttest loops in those cases where we want the loop body to be executed atleast once, while we will ...

Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Networking Questions

This quiz consists of some basic networking questions.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

C# variables and classes

This quiz contains questions about C# classes and variables.

Javscript Basics

Quiz on basics of javascript programming language.