how has C bitten you?

Andrew Koenig ark at alice.UUCP
Fri Jul 26 10:36:41 AEST 1985


I am collecting examples of how C can bite the unwary user.

Consider, for example, the following program fragment:

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

On many implementations, this will result in an infinite loop.

If you have any good examples, and you don't mind my re-publishing
them (with attribution), send them along!



				Andrew Koenig
				AT&T Bell Laboratories
				600 Mountain Avenue
				Murray Hill NJ 07974
				research!ark      (or alice!ark)



More information about the Comp.lang.c mailing list