All right.
Let's discuss on CNN like V.
So these two variables combined describe information passed to you when the program starts now.
Oxy will contain the fall name of this executable.
That's the first thing it contains.
And then anything else after that is options and values pass to our program just before it runs.
Now I know this might seem a bit confusing to you but just bear with me.
I'm full of what I'm doing and it all makes sense.
So we're first going to do is we're going to say if oxy equals 1 print f no arguments provided the 10
minus one and we're not going to go for integer i.e. equal zero i.e. below oxy ie plus plus.
So nice follow print f OG V I and you also need to put the percent S for backslash n by here as well.
So the code should look like that.
It's pretty straightforward.
You're a bit confused now but as soon as we run this you'll understand I promise compile that with JCC
made up C dash the main running main you see no arguments provided.
OK.
So then type Maine hello.
Now what you see that you see me now put it and you see.
Hello.
So Main is the executable that we have running and hello is the second argument.
So essentially what happens is Maine hello.
How are you.
You can see after each space is a separate argument.
So essentially what's happening is what we call main here.
We start our program however everything we pass in here is passed to our program and it's passed to
us through oxy and V and each space in this command represents a separate option.
So Oxy is the number of arguments passed.
So in this case is one two three four five and OG v contains the actual character data such as Hello
how are you.
So you know you can also do things like this double quotes and then it's seen as one argument.
So that is how you can pass arguments to your program and be able to process those options pass to it.
So the reason why this is good is is so I might want to pass a file name in here for you to process
and then you know that OG the one contains that following because of v 0 is the main the actual suitable
name.
I hope that really sums it up.
But if you have any questions send me a message.