Serge Paccalin <sp@mailclub.no.spam.net.invalid> writes:
Le mercredi 3 août 2005 à 11:30, Kuku a écrit dans comp.lang.c*:
[...]
strupr(e2.n);
Here, you try to write in that memory. Since you're not supposed to
modify it, anything can happen. That is undefined behavior.
Assuming that strupr modifies the string to which e2.n points. That
seems likely, but there is no strupr() function in the standard.
Also, the original program is missing a #include directive for
<stdio.h> (it calls printf) and for whatever header declares strupr().
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.