Light note for the day

der Mouse mouse at mcgill-vision.UUCP
Wed Feb 1 20:34:33 AEST 1989


> Besides, if you think that your AST/286 is so good, run the following
> C program, if you get the output
> 1
> 70000
> Your C compiler wins my award for effort otherwise you won't get any
> words of sympathy from me...

[program compressed -dM]
> main ()
> {
> 	unsigned long i;	char *s, *malloc();
> 	s = malloc ((unsigned)70000);
> 	for (i=0; i < ((unsigned)70000); i++)	s[i] = i;
> 	printf ("%d\n%d\n", s[1], s[(unsigned)70000]);
> }

Award for effort?  I should think so!  >=17-bit chars, retrieving
something he never stored from an element he didn't malloc()....where
can I get a copy of this compiler? :-)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu

stupid
50%
rule



More information about the Comp.lang.c mailing list