how has C bitten you?

Niket K. Patwardhan lcc.niket at LOCUS.UCLA.EDU
Wed Jul 31 04:25:14 AEST 1985


Andrew:
      Regarding

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

you should have expected some problems, as you are writing one past the end of
the array! The correct test to use is < not <=!



More information about the Comp.lang.c mailing list