// A demo of using command line arguments
// This program will start an argument with you
// It will take whatever you say and refuse to agree
// Marc Chee (cs1511@cse.unsw.edu.au)
// Edited March 2020
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("Well actually %s says there's no such thing as ", argv[0]);
int i = 1;
while (i < argc) { // have written i - 1 words from argv to stdout
fputs(argv[i], stdout);
printf(" ");
i++;
}
printf("\n");
}
Resource created Wednesday 27 January 2021, 01:16:16 PM, last modified Thursday 18 March 2021, 06:55:53 PM.
file: arguments.c