Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site hou5e.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!ihnp4!drutx!houxe!hogpc!houti!ariel!hou5f!hou5g!hou5h!hou5a!hou5d!hou5e!tgg
From: tgg@hou5e.UUCP
Newsgroups: net.lang.c
Subject: Re: little quiz
Message-ID: <940@hou5e.UUCP>
Date: Thu, 22-Mar-84 10:29:50 EST
Article-I.D.: hou5e.940
Posted: Thu Mar 22 10:29:50 1984
Date-Received: Fri, 23-Mar-84 20:44:00 EST
References: <9031@arizona.UUCP>
Organization: AT&T Information Systems Laboratories, Holmdel, NJ
Lines: 19

>While we are discussing C, how many people believe that
>        for (initial; test; update) statement;
>is ALWAYS equivalent to
>        initial;
>        while (test) {
>                statement;
>                update;
>                }
>how many people can cite the exception to the above rule?  (ie, one
>clearcut case where they produce different results).

Easy - what about:
	for ( a= 0; a < 100; a++ )
		if ( a % 10 == 0 )
			printf("where a is a multiple of ten is %d\n",a);
		else
			continue;	/* bad example but it works */

Tom Gulvin	AT&T Information Systems - Holmdel