Re: Need Help from u friends...



Simon Biber said:

<snip>

Question for regulars: Is the modification of argv[0] allowed in
standard C? If not, this code needs some simple changes.

You can modify the string that argv[0] points to. You may not lengthen
it, however, and nor may you point argv[0] to some other location.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
.



Relevant Pages

  • Re: string upper, string lower, string subthisforthat
    ... | allowed to modify any elements of the input elements. ... | sequence operations section of the Standard. ... | that the sequence is not allowed to be modified. ... | error to leave out case insensitive string comparisons. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: bus errors accessing a char * by index?!
    ... The problem is that you're trying to modify a string literal. ... Any attempt to modify this array, ... You might want to look at the standard strtok() function. ...
    (comp.lang.c)
  • Re: Why is it dangerous?
    ... learn that C had such weak string handling, ... Exploiting getson an auto buffer ... that omitted any standard on what could or could not be input. ... the pedants, on whose code contains more *actual* bugs. ...
    (comp.lang.c)
  • Re: Anyone object to the following change in libc?
    ... sscanfinput string. ... ISO C standard" refers to "c89", which is the version of the C ... non-sensical format specifier entirely, since any characters that ... conformance test suite for ISO C complaining about the ...
    (freebsd-current)
  • Re: Help a beginner - simple lowercase to uppercase and so on
    ... only modify your local variables. ... Standard to find somewhere else other than a stack in which to pass ... Dijkstra said somewhere that a good programmer has good taste, ... because he's "conformed" to the standard is weasel-assed reasoning. ...
    (comp.lang.c)