I don't know what to do! I have a great understanding of C basics. Structures, file IO, strings, etc. Everything but CLA. For some reason I cant grasp the concept. Any suggestions, help, or advice. PS I am a linux user
The signature of main
is:
int main(int argc, char **argv);
argc
refers to the number of command line arguments passed in, which includes the actual name of the program, as invoked by the user. argv
contains the actual arguments, starting with index 1. Index 0 is the program name.
So, if you ran your program like this:
./program hello world
Then: