answersLogoWhite

0

Bounded loops are also known as counting loops because they will iterate a pre-determined number of times before terminating. For example:

for x=1 to 15

print x

next x

Here, the variable x is incremented by 1 at the end of each iteration, thus the loop execute 15 times in total.

Unbounded loops are not defined by a specific count, but by some other condition. Unbounded loops are often called infinite loops, however there must always be an exit condition that is reachable.

x = rand()

while x<>0

print x

x = rand()

end while

Here, x is set to some random value. So long as x is non-zero, its value will print and x will be set to another random value. The loop may not execute at all (if x is initially zero), but once started it is not known how many times it will iterate until the exit condition is satisfied.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What is the difference between bounded and unbounded transmission media?

v cv


What is the difference between bounded and unbounded media?

Bounded media use physical connectors, such as cables or wires, to transmit signals between devices, while unbounded media use wireless transmission methods, like radio waves or infrared signals. Bounded media have a defined path for signals to travel, while unbounded media allows for more flexibility in signal transmission without physical constraints.


Is unit step signal is bounded or unbounded?

bounded signal


What is difference between infinite Bounded and infinite unbounded set?

A set of numbers is bounded if there exist two numbers x and y (with x &acirc;&permil;&curren; y)such that for every member of the set, x &acirc;&permil;&curren; a &acirc;&permil;&curren; y. A set is unbounded if one or both of x and y is infinite. Similar definitions apply for sets in more than 1 dimension.


Is the identity function bounded or unbounded?

That depends! The identity operator must map something from a space X to a space Y. This mapping might be continuous - which is the case if the identify operator is bounded - or discontinuous - if the identity operator is unbounded.


Difference between automatic buffering and explicit buffering?

Explicit buffering is also known as "Zero Capacity Buffering" where it has maximum length of 0. Automatic buffering can be either "Bounded Capacity Buffering" or "Unbounded Capacity Buffering"


What is the difference between automatic buffering and explicit buffering?

Explicit buffering is also known as "Zero Capacity Buffering" where it has maximum length of 0. Automatic buffering can be either "Bounded Capacity Buffering" or "Unbounded Capacity Buffering"


Is every continuous function is bounded in C?

No. y = 1/x is continuous but unbounded.


What is the difference between a mailboxes and message queue?

Mailbox is similar to a queue, which allows only atomic operations. They can be bounded/unbounded. Get/put task is used to suspend abounded mailbox. That?s why mailbox is used more for communication between threads. Queues are large structures. Inserting data in queues is very difficult


Is the graph of a solution set of a system of two linear inequalities always bounded?

No it is NOT always bounded. Here is an example of an unbounded one. 1. 2x-y&gt;-2 2. 4x+y


What is a bounded array?

Always arrays are bounded almost in all programming languages.As we all know array will be having bounded that is fixed no. of values in it.In java you can consider ArrayList a unbounded array.Since that is implementing a list array can keep on growing and will not be bounded in size.But you can not this kind of feature in the languages like c.you must define an array which is of fixed length.


What is unbounded solution?

An unbounded solution refers to a scenario in linear programming where the objective function can be infinitely improved without reaching an optimal solution. This typically occurs when the feasible region is not bounded and extends infinitely in one or more directions. In such cases, the problem is said to have an unbounded solution because the value of the objective function can be made arbitrarily large or small without limit.