Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.7.0.8 $; site ccvaxa
Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!dual!qantel!ihnp4!inuxc!pur-ee!uiucdcs!ccvaxa!preece
From: preece@ccvaxa.UUCP
Newsgroups: net.lang.c
Subject: Re: how has C bitten you?
Message-ID: <2600011@ccvaxa>
Date: Mon, 5-Aug-85 11:44:00 EDT
Article-I.D.: ccvaxa.2600011
Posted: Mon Aug  5 11:44:00 1985
Date-Received: Mon, 12-Aug-85 02:05:10 EDT
References: <4051@alice.UUCP>
Lines: 14
Nf-ID: #R:alice.UUCP:-405100:ccvaxa:2600011:000:477
Nf-From: ccvaxa.UUCP!preece    Aug  5 10:44:00 1985


> > 	int i, a[10];
> > 	for (i = 0; i <= 10; i++)
> > 		a[i] = 0;
> > 

> This looks to me like it will simply overwrite one int's worth of
> memory beyond the end of the array "a" with the value 0.  Granted,
> depending on what happens to be after "a", this can have disastrous
> results, but is there really an implementation in which it will
> (reliably) lead to infinte looping?
----------
Yes.  Any implementation that allocates the space for i following the
space for a.