Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ewarburg@inara:~$ cat foo.c
- #include <stdio.h>
- int main(int argc, char **argv) {
- int i;
- printf("This program is called %s\n", argv[0]);
- for (i = 1; i < argc; i++) {
- printf("%d: %s\n", i, argv[i]);
- }
- return 0;
- }
- ewarburg@inara:~$ gcc -Wall -o foo.out foo.c
- ewarburg@inara:~$ ./foo.out these are parameters
- This program is called ./foo.out
- 1: these
- 2: are
- 3: parameters
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement