Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!rutgers!elbereth.rutgers.edu!ron.rutgers.edu!ron From: ron@ron.rutgers.edu (Ron Natalie) Newsgroups: comp.lang.c Subject: Re: How big is the argv[] array? Message-ID: Date: 4 Oct 88 15:12:38 GMT References: <1239500004@osiris.cso.uiuc.edu> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 22 Your code will work, albeit a pretty raunchy way of doing things. Assigning into the argc'th position is safe since it is allocated (it holds that null, -1 if you're really living in the past). You just have to be careful that nothing later on is going to check to see if that null was there (like you pass the whole kit and kaboodle to execv or something). Perhaps I can suggest an alternative: main(argc, argv) int argc; char **argv; { if(argc == 1) process_arg(DEFAULT_ARG); else while(--argc) processs_arg(++argv); } Almost anything you can kludge, you can spend a minute to do right. -Ron