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.
the counter variable cannot be initialized in while loop before entering into the block.
Both are programming commands. A do/while loop will execute at least once. A while loop may not execute at all.
Well 'while' goes like this: while (condition) statement 'for': for (initialize; condition; after-each-loop) statement
No difference.
You mean PL/SQL? Well, they are different things, read the manual for details.
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.
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
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.
While: If we can use while statement it will check the condition then proceed further loop statement.DoWhile: If we use dowhile, first execute loop statement then check the condition.
The difference is that pre means before and post means after in Latin so it's tested before or after. :)
A while loop executes code inside the while block continuously until the said condition is not true. A for loop contains three parts. The first part is carried out prior to the for loop, the middle part is executed by the for loop until it is no longer true, and the final part is performed at the end of each go round of the loop.
the test condition will be checked first after wards the body of the loop will be excuted in while statement and the the do while statement represented the body of the loop will be executed first and then the test condition will checked next