Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

while /do-while loop differences

Status
Not open for further replies.

sivamit

Full Member level 4
Joined
Dec 1, 2005
Messages
201
Helped
20
Reputation
40
Reaction score
14
Trophy points
1,298
Activity points
2,651
while /do-while loop

What are the differences between while loop and do-while loop..?



Thanks
 

while /do-while loop

body of while loop never execute if test condition is false.... where as body of do while loop executes atleast one time even test condition is false b/c in while loop test condition is check first, on the other hand in do while test conditon check always chk after the body of loop execution.
 

while /do-while loop

while loop never execute if test condition is fails where as do while loop executes atleast one time.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top