6
Arguments passed on the command-line
- #include <stdio.h>
- main( int argc, char **argv) {
- while ( --argc )
- printf( argc > 1 ? "%s " : "%s\n", *++argv );
- }
$ gcc -o echoa echoa.c
$ ./echoa Hello world!
Hello world!
$ ./echoa
$
$ gcc -o echoa echoa.c
$ ./echoa Hello world!
Hello world!
$ ./echoa
$
Comments