Can someone please explain

Pages: 12
Technically, argc may be 0, and in that case argv[0] is also 0. Even when argc is 1 (or greater,) argv[0] may be an empty string, regardless of how the program is launched.
Guys, while I know how to use argc and argv[], I was responding to a question about their use and fine details like this tend to get in the way of the concept.

Yes, argv[0] is the command used to launch, in fact busybox uses this to know what to do, it can be a very powerful feature.

Dax.
Topic archived. No new replies allowed.
Pages: 12