Question: My application has potentially a huge number of arguments passed in and I want to avoid the memory of hit duplicating the arguments into a filtered list. I would like to filter them in place but I am pretty sure that messing with argv array itself, or any of the data it points to, is probably not advisable. Any suggestions?

Answer: 
Once argv has been passed into the main method, you can treat it like any other C array - change it in place as you like, just be aware of what you're doing with it. The contents of the array don't have an effect on the return code or execution of the program other than what you explicitly do with it in code. I can't think of any reason it wouldn't "be advisable" to treat it specially.

Of course, you still need to take care about accidentally accessing memory beyond the bounds of argv. The flip side of it being accessible like a normal C array is that it's also prone to access errors just like any other normal C array. (Thanks to all who pointed this out in comments and other responses!)
Some libraries do this!

The initialization method provided by the glut opengl library [(GlutInit)](https://www.opengl.org/resources/libraries/glut/spec3/node10.html) scans for glut related arguments, and clears them by moving the subsequent elements in `argv` forward (moving the pointers, not the actual strings) and decrementing argc

> 
> 2.1
> 
> 
> glutInit glutInit is used to initialize the GLUT library.
> 
> 
> Usage
> 
> 
> void glutInit(int \*argcp, char \*\*argv);
> 
> 
> argcp
> 
> 
> A pointer to the
>  program's unmodified argc variable from main. Upon return, the value
>  pointed to by argcp will be updated, because glutInit extracts any
>  command line options intended for the GLUT library.
> 
> 
> argv
> 
> 
> The program's
>  unmodified argv variable from main. Like argcp, the data for argv will
>  be updated because glutInit extracts any command line options
>  understood by the GLUT library.
> 
> 
>