answersLogoWhite

0

There is no such difference, for and while loops are convertible:

in: for (exp1; exp2; exp3) stmt;

out: { exp1; while (exp2) { stmt; exp3; }}

in: while (exp) stmt;

out: for (; exp; ) stmt;

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

Difference of step up and step down in terms of no of loops in the secondary coil?

If the primary coil has ten loops and the secondary coil has five loops then the secondary coil works as a 50% step down


Loops of wire in a motor rotate because a?

Loops of wire in a motor rotate because they are placed in a magnetic field and carry an electric current, which generates a magnetic force due to the interaction between the magnetic field and the current. This force acts on the wire loops, creating torque that causes them to spin. As the loops rotate, the direction of the current is often switched to maintain continuous motion, allowing the motor to operate effectively. This principle is based on electromagnetic induction and is fundamental to the operation of electric motors.


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


Difference between deterministic and nondeterministic loop?

Deterministic and non-deterministic loops A deterministic loop is predictable. The number of iterations of such a loop are known in advance, even before the loop has started. Most counting loops are deterministic. Before they start, we can say how many times they will execute. A non-deterministic loop is not easily predicted. A loop that is driven by the response of a user is not deterministic, because we cannot predict the response of the user. Non-deterministic loops usually are controlled by a boolean and the number of iterations is not known in advance.


Why do we avoid loops in programming?

We don't avoid loops in programming. Loops are a fundamental feature of many algorithms. If we need to iterate over a data sequence in order to perform the same set of operations upon each data element, we would use an iterative loop. If we need to repeatedly reduce a larger problem into one or more smaller instances of the same problem until the problem is small enough to be solved we'd use a recursive loop.

Related Questions

What is the difference between finale notepad and fruity loops programs?

Finale is for writing sheet music for real instruments. Fruity Loops is for creating electronic music.


What is the difference between radial and ulnar loops?

Why are you posting a question to do with finger print identification in several computer programming wikies.


What is the difference between loops and functions?

LOOP: In loops reusability of the code is restricted to a specific area FUNCTION: In functions reusability of the code is not restricted to specific area.That means you can call the function code from any where in the program


What is the difference between do and while loops in c?

the main difference b/w do and while loops is that do loop will run atleast once even if condition is not satisfied but while loop will not execute even once if condition is not satisfied . this is bcoz in do loop condition is checked after one execution but in while condition is prechecked.


What are One of the differences between electric and magnetic fields is that electric fields lines always form closed loops?

One key difference between electric and magnetic fields is that electric field lines originate from positive charges and end on negative charges, forming closed loops; whereas, magnetic field lines always form closed loops, never having a starting or ending point.


Difference of step up and step down in terms of no of loops in the secondary coil?

If the primary coil has ten loops and the secondary coil has five loops then the secondary coil works as a 50% step down


Loops of wire in a motor rotate because a?

Loops of wire in a motor rotate because they are placed in a magnetic field and carry an electric current, which generates a magnetic force due to the interaction between the magnetic field and the current. This force acts on the wire loops, creating torque that causes them to spin. As the loops rotate, the direction of the current is often switched to maintain continuous motion, allowing the motor to operate effectively. This principle is based on electromagnetic induction and is fundamental to the operation of electric motors.


Does the distinction between Ulnar and Radial loops depends on which hand the loop is found on?

No, the distinction between Ulnar and Radial loops does not depend on which hand the loop is found on. Ulnar loops have their opening towards the pinky finger side of the hand, while Radial loops have their opening towards the thumb side of the hand regardless of which hand they are found on.


Tell 2 or 3 differences in table manner of differences between for and while loops?

Both For and While loops are available for the purpose of executing a piece of java code repeatedly until a particular condition is met. The only difference being - the loop condition/counter has to be modified inside the while loop every time whereas the condition is integrated in the for loop definition. Otherwise both the loops are exactly same in all aspects.


What is difference between solenoid and coil?

Solenoid has a longer length compared to its diameter. The Distance between two loops in a solenoid is longer. while Coil has the bigger diameter. The distance between two loops in a coil is shorter compared to its diameter.


What are loops in ICT?

In ICT, loops are programming constructs that allow a set of instructions to be executed repeatedly based on a specified condition. They enable automation of repetitive tasks, improving efficiency in code execution. Common types of loops include "for," "while," and "do-while," each serving different use cases depending on how many times the code needs to be repeated and under what conditions. Loops are fundamental to algorithms and programming logic, facilitating tasks like iterating over data collections.


What is the difference between positive and negative feedback loops?

Positive feedback loops amplify changes or effects, leading to an increase in the output or a runaway process, such as during childbirth when contractions intensify. In contrast, negative feedback loops counteract changes, promoting stability by reducing the output or returning a system to its set point, like how the body regulates temperature. Essentially, positive feedback drives growth or escalation, while negative feedback fosters balance and homeostasis.