Parameters are the values you pass into a function.
Here's a simple function:
1 2 3 4
|
int addOne ( int input)
{
return ( input + 1);
}
|
Look at the first line.
int addOne ( int input)
The name of this function is
addOne.
See that
int at the start, before the name? That indicates that this function returns (i.e. gives back) an
int.
See that bit in the brackets,
( int input )
? That is the list of
parameters. The
parameters are what you must pass to the function when you use it. In this case, you can see there is one
parameter;
int input
. The
int is the
type of the parameter, and
input is the
name that this parameter will have inside the function.
Now lets look at your code. There's one function here:
int main(int argc, char* argv[])
We can see that there are two parameters;
int argc
and
char* argv[]
. The first parameter is an
int, and the second parameter is an
array of char*.
The main function is a standard function, and the value of
argc tells you how many
char* there are in the array.
Your instructions are a little bit wrong; I think they don't actually mean the number of parameters; I think they mean the number of char* in the second parameter. Still, a little mistake in the wording is not something to get hung up on.