Yes there is.
If you look at the main function's full prototype:
int main(int argc, char **argv, char **env)
argc: This is the argument counter, it contains the number of argument given by the user (Assumin the command is cd, entering cd home will give argc = 2 because the command name is always argument 0)
argv: This is the arguments values, it is an array of size argc of char* pointing to the arguments themselves.
env: This is a table (as argv) containing the environment when the program is called (through a shell for example, it's given with env command).
As for an example of making an array of things: Two ways are possible:
First, a fixed-length array:
char tab[4]; // declares a variable "tab" which is an array of 4 chars
tab[0] = 'a'; // Sets the first char of tab to be the letter 'a'
Second, a variable-length array:
//You cannot do:
//int x = 4;
//char tab[x];
//Because the compiler cannot create arrays with variable sizes this way
//(If you want more info on this, look for heap and stack memory allocations
//You have to do:
int x = 4; //4 for example
char *tab;
tab = malloc(sizeof(*tab) * x); //or malloc(sizeof(char) * x); but I prefer *tab for
//many reasons, mainly because if you ever change the declaration from "char *tab"
//to "anything *tab", you won't have to peer through your code to change every malloc,
//secondly because you always write something = malloc(sizeof(*something) ...); so you
//have a good habit.
Using the array:
Any way you choose to declare it (fixed-size or variable-size), you always use an array the same way:
//Either you refer a specific piece:
tab[x] = y; //with x a number (or a variable containing a value inside your array boundaries; and y a value that can fit inside the type of tab[x] (or a variable of that type)
//Example:
int x = 42;
int tab[4]; // An array of 4 ints
tab[0] = 21; //direct value
tab[1] = x; //from a variable
tab[2] = tab[0]; //read from the array
tab[3] = tab[1] * tab[2]; //calculus...
//OR you can use the fact that array decays to pointers (and if you use a variable-size array, it's already a pointer anyway)
int y = 21;
int *varTab;
varTab = malloc(sizeof(*varTab) * 3); // An array of 3 ints
*varTab = y; //*varTab is equivalent to varTab[0]
varTab[1] = x; //Same as with int tab[4];
*(varTab + 2) = 3; //Equivalent to varTab[2];
//In fact the compiler interprets xxx[yyy] as *(xxx + yyy).
Star-ing a variable is called dereferencing. If you don't know how this works I highly suggest you take a look.
I hope this is explained well-enough. If you still have questions please comment and I'll edit this answer.
mainis anintthat holds the number of commandline arguments.main()function in theargcandargvparameters. The former is an integer containing the count of the arguments and the latter is an array of pointers tochars (i.e. strings).