Path: utzoo!attcan!uunet!nih-csl!lhc!ncifcrf!haven!aplcen!samsung!cs.utexas.edu!hellgate.utah.edu!uplherc!giga!unislc!ttobler From: ttobler@unislc.uucp (Trent Tobler) Newsgroups: comp.lang.c Subject: Re: Comparing strings... Message-ID: <1990Oct23.193959.12595@unislc.uucp> Date: 23 Oct 90 19:39:59 GMT References: <1990Oct17.030157.460@ux1.cso.uiuc.edu> Organization: Unisys, SLC Utah Lines: 29 From article <1990Oct17.030157.460@ux1.cso.uiuc.edu>, by gordon@osiris.cso.uiuc.edu (John Gordon): > > Also, one other thing: for() and while() loops are essentially > identical. The following loops are exactly the same: > > #1) > for(i = 0; i < 100; i++) > { > body of loop > } > > > #2) > i = 0; > while(i < 100) > { > body of loop > i++; > } > > > Hope it helps. Please note that for() and while() are identical, except when using the continue within the body of the loop. In the while() statement, the i++ is not performed whereas in the for() statement, it is. Trent Tobler