Content deleted Content added
No edit summary |
|||
Line 6:
C uses <code>argv</code> to process command-line arguments.<ref>{{cite web|url=http://publications.gbdirect.co.uk/c_book/chapter10/arguments_to_main.html |title=The C Book — Arguments to main |publisher=Publications.gbdirect.co.uk |date= |accessdate=2010-05-31}}</ref><ref>http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/share/misc/style An example of parsing C arguments and options</ref>
An example of [[C (programming language)|C]] argument parsing would be:
<source lang="C">
#include <stdio.h>
void main (int argc, char *argv[])
{
int count;
for (count=0; count<argc; count++)
printf (argv[count]);
}
</source>
===Java===
An example of [[Java (programming language)|Java]] argument parsing would be:
|