answersLogoWhite

0

Microsoft Windows
Email and IM
C Programming
The Difference Between

Difference between for loop and while loop?


Top Answer
User Avatar
Wiki User
Answered 2010-12-15 06:31:20

What kind of loop and a while loop. Please be more specific if you want any chance of the question answered.

answ2. But in general, a For loop will have a numeric value attached, such as For 1 to 10, ..

Whereas a While loop will usually be dependent on some condition, such as While t > 99, Do.. ; or While clock is LT 10.00, Do ..

001
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Your Answer

Loading...

Still have questions?

Related Questions

Difference between do while and for loop?

The do while loop is executed at least once, while the for loop may not be executed even once.


What is the difference between looping statements - c program?

I want the difference between the for loop & while loop statements


What is the difference between a do while loop and a for loop in c?

the counter variable cannot be initialized in while loop before entering into the block.


What is the difference between a while loop and a do-while loop?

In a while loop ... while (condition) statement; ... the condition is tested first. In a do while loop ... do statement; while (condition); ... the condition is tested last.


What is the difference between for if-then and for loop?

repetition: while, for and do-while are loops, if-else is not.


What is the differentiation between for loop and do while loop?

The difference is that do while loop allows you to make at least one iteration, even if the condition for while is wrong. For loops does not allow you to do that.


What is the Difference between while and do while?

Both are programming commands. A do/while loop will execute at least once. A while loop may not execute at all.


What is the difference between a for loop and a while loop?

no difference in logic in both of them you put the key to enter :while( ....),for(;....;) but infor loop you have option to initialize value and make operation on it for(int i=0;...;i++){} same int i=0; while(..){ i++;}


What is the difference between if and while loop?

Easy: if-else is not a loop; while, for and do-while are loops.if-else just run once, but do-while run many times.


What is the main difference between a while loop and a do while loop?

In most computer programming languages using these constructs:while loop, the condition is tested beforeentering the loop (loop may be skipped completely)do while loop, the condition is tested aftercompleting the loop (loop will execute at least once)


Difference between for and while loop not in syntactically?

Well 'while' goes like this: while (condition) statement 'for': for (initialize; condition; after-each-loop) statement


Is a while loop or a for loop faster?

No difference.


What is the difference between do while and while loop in java?

do ... while will evaluate the condition at the end of the loop.while... will evaluate the condition at the beginning of the loop.do ... while will evaluate the condition at the end of the loop.while... will evaluate the condition at the beginning of the loop.do ... while will evaluate the condition at the end of the loop.while... will evaluate the condition at the beginning of the loop.do ... while will evaluate the condition at the end of the loop.while... will evaluate the condition at the beginning of the loop.


Difference between while loop and do while loop?

A do loop will always execute at least once because the condition check is at the end of the do loop. The loop continues until the condition is false. do { .... .... } while(a==1); A while loops checks the condition first and will not execute if the condition is false. while (a==1) { .... .... }


Difference between for loop and while loop is?

Both the for loop and the while loop execute the loop block until a particular condition is satisfied. The for loop is a compressed form of while loop because the loop counter and loop condition are both declared in one line instead of different lines. ex: for(int i = 0; i < 10; i++){ ... } int i = 0; while (i < 10){ ... i++; }


What is the Difference between while loop and for loop in C programming?

when use for loop user can assign the value of the variable inside the loop, while checking the condition. but in while loop he has to assign it out side of the loop. like for loop: for(i=5, n=2; i<=8; i++) { n=n+5; } while loop: int i=5, n=2; while(i<=8) { n=n+5; i++; }


What is the different between for and while loop?

The coding syntax is the only difference between the two loops. Their features and functionalities are the same. Ex While loop: int x = 8; while (x > 8) { System.out.println("in the loop"); x = 10; } Ex for loop: for (int i = 0; i<10; i++) { System.out.println("i is " + i); }


What is the difference in while loop and do while loop?

The condition for a while loop is tested at the start of the loop. It is tested at the end of the loop for a do-while loop. The body of a do-while loop will always be executed at least once. Whereas for a while loop if the condition is false to start with, the body of the loop is never executed.


What is the difference between while loop and for loop in oracle?

You mean PL/SQL? Well, they are different things, read the manual for details.


What is the different between loop and do while loop?

It's like fruit (loop) and apple (do-while loop).


What is a difference between while and do while loop in c programming?

The while loop evaluates the loop expression first. If it is true, the loop body executes, and then the loop iterates with the loop expression. If the expression is initially false, the loop body will never execute.The do while loop evaluates the loop body first, then it evaluates the loop expression. If it is true, the loop iterates with the loop body. The loop body will execute at least one time, no matter what the outcome of the loop expression.


Difference between while and do while loops in java?

The most important differences are: a. The while loop starts with a condition whereas the condition is the line of code in case of a do while loop b. The do while loop is guaranteed to run the loop body atleast once even if the condition is an impossible to satisfy but such a guarantee is not available with the normal while loop


What is difference between for loop and while loop in C?

Well, the for loop and while loop are equivalent, in that you can use them both to do the same things. The difference is mainly syntactic. A for loop should be used to progress through a sequence, where there is a clear initialization, end test, and increment at each step through the loop, for example, to loop through the elements of an array or set. The while loop should be used when there isn't a clear progression, for example, to loop over input until the input is done.the basic difference is that for loop is used when fixed iterations have to be performed whereas while loop is used when the number of times the loop construct is to be performed is not known..


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.


Open loop and close loop system in injection moluld machine?

loop checking is perform before cable termination..the difference between a close loop and open loop is,tha close loop has a feedback while the open loop has not.