Hi everyone.
So in this video we are going to study about dysfunction seen dark kettling.
But before starting discussing about dysfunction let us discuss about something else if you create a
correct area let's say of size food and if you will write C in input.
So what is the maximum number of characters that you can take as input.
So the size of my end is actually for so 0 1 2 and 3 0 2 3 and 6.
So my question is what is the maximum number of critic best that you can store here.
So can you store ABC.
No you cannot store ABC TV because the last character has to be another character so the maximum number
of predictors that you can store is actually three only because the last character has to be an electric
bill.
So it cannot story.
Basically can you at ABC.
Yes.
Can you still Amy.
Yes.
In your story.
Yes.
So the maximum characters that you can story is actually three because the last character has to be
another character.
So there should be space within them character.
No this is not the case for the DADT.
If you are creating an endangered area of size forward then what will happen then you can store food
and be just 0 1 2 and 3 so you can store food and deejays.
So basically if you are creating an immediate area of size and then what will happen.
You can store at the max and characters and in B just Saudi you can store and indeed yes but this is
not the case with the correct baddies.
If you are creating iconic Barry correct Barry of size and then the maximum number of critic best doing
a story is actually N minus one because the last guy is going to be a null character symbol.
Now what if you do not follow this for example you are creating you are creating input edit you are
creating a character Eddie I'll size 4 and then you are taking input so see in input and let's say you
give ABC TV you are giving ABC.
So this is the situation of it and put Eddie is president here to be president is present day and these
presented here.
So you see in function will look perfectly fine this scene is going to look perfectly fine but if he
will try to print the content of it.
Eddie so if you will try and print scene input if you will try and do this.
So what will happen so see out has a very standard property.
It will go to the foster nicks.
It will go to the first character it will print a.
Then it will print be then it will print C then it will bank de so it has not encountered Elliott.
So what it will do it will bring the content present at.
So this is index for 0 1 2 3.
So it will print what I would do as president I draw next food then whatever is present at the next
five and so on.
So it will start printing everything until my see out the lot and counting then.
So it will print everything and the problem with this is basically so this memory is not ours.
This memory doesn't belong to our program.
So what can happen.
Our program may or may not crash.
So if this is a very critical memory then why did it happen.
Your program may crash or may not crash but we should never do this.
We will never do this.
So if the size of your input that is actually forward then the maximum character that you are going
to store is actually t only so you will not give in would like this.
So that is the limitation of you at the scene function so using function basically can take anything
as input so that is the limitation of your scene.
So that's why we need this function scene.
Good line.
Now before seeing not good line so apart from this limitation.
So the one limitation that we have already seen is this one basically you can give any string and it
can act as input and in a combination of characters input and it will basically store that characters.
So this is the first limitation.
Now let's discuss the second limitation.
So the second limitation for scene is basically.
So let's say you are creating a input Eddie let's say of six hundred and then basically if you will
take scene input and you are doing see out CO2 input scene input into out output.
So let's say my input I'm giving input Hello space world so I live what should be my output.
So I live should see old print those she out should print Hello World but let's see what it will print.
It is not going to print Hello World.
So what I want to say so I am creating this idea enter your name see in name and then I'm c out and
let us comment this land function
so let's see if you will give input Hallowell then what will be our output so I am giving Hello space
hello world so malpractice coming out to be held only so your name is Hello why it is so so this is
the second limitation of seen so it is a limitation so let's see so you are creating name Eddie and
the first index zero and the last index is actually 99 and you are taking input Hello space well so
this is Hello.
H E N N O then space then word.
This is what we expect but the scene property is so scene will stop taking input as soon as it encounters
spaces or tabs Arnold corrected sorry not not corrected.
So new line.
So again I'm repeating myself the property you've seen is very simple.
Scene will stop taking in but as soon as it will encounter spaces or tabs or new line so here.
Hello.
And then you are giving space.
So basically it will not take input after the space including space also.
So basically basically your name correct there is only string Hello it is only storing hello and then
Dino corrected so that's why when you're trying to seek out your connectivity then hello is getting
printed.
Simple.
So I may be myself but what is happening here so the second limitation I've seen is actually so the
second limitation I've seen is very simple.
It will stop taking in but as soon as it will encounter spaces or tabs or a new line so this is new
line and in our case what we are doing we are giving in Portillo then space so it don't happen scene
will stop at this point saying it will stop at this point and basically Hello.
And then null corrected.
So this will be your situation.
So this is my input idea.
So this is your input today.
And when you are trying to print the content of your input that is or what she will do it will burn
Halo and then it will end golden then that's where it will stop.
So that's why the output of Hallowell is only Hello.
So this is the second limitation of C in.
And both these limitation can be solved with the help of C not good line.
So now we will discuss seemed good guideline and we will see how C and or good land will help us so
C not get laid.
So this is inbuilt function C in.
Get lane so actually it takes two things as input.
So a first is basically the string name.
All we can say the name of Deckard Barry.
The second thing is basically the land.
How many characters you want to take as input.
And the third parameter.
So it takes with us.
And the third department is actually optional.
So we will discuss about the third about a meter also but first let us discuss the first two barometers.
What I will do I will write C and not guideline input Eddie.
So this is the name I have created.
I input edit above and the size was handed so what is the maximum number of practice that I can insert.
So they mix in a move quick this I can insert is actually 99 because the last one is going to be null.
So you will write hundred head so a hundred signifies you can insert the mix.
You can take and put the max in 99 characters.
You can not take note as input because the last character is going to be the simple.
So let's use c not good line in our program
so here instead of scene name what I will do.
Scene dart get Lane
It takes two argument name and the second one is the mix in the metaphoric does allow.
So the mixing effect as allowed is handed out of under.
You can take ninety nine as input and 1 connect is going to be reserved for the null character.
Now if you will give Hallowell as input so the output when we Hallowell only
so my name is lowered space.
Hello space world and see that would produce Hallowell so that's how we see node get Lane is better
then seen now.
It seemed not good Lane does differently what was the problem with the scene.
This was the problem for the scene for Hallowell.
And what scene or Gatland do so.
Scene.
Good line will stop taking input as soon as you will reach the character.
Basically the new Lincoln decided not man.
Please forgive me.
So as soon as the scene or Gatland encounters the night quite a bit it will stop taking input.
So that means hello while it can be stored.
So if you will go and put hello world so how I will give input I will write Hello then space then world
and then I will press enter.
So Hallowell will get stored in your head and put Barry along with Dino correct then obviously like
has to wait so along with an uncorrected.
So that's how we seem to get Lane rulebook because it will only stop ticking and put as soon as you
will enter the market Edison as you will enter the new lane.
Corrected.
So this is how the scene don't get Lane will help us in making this type of input spaces the input in
which we have spaces or we can also have multiple spaces.
Now let's say now the first limitation I've seen was it can't take anything as input.
So for example if I'm creating a kind of battery of size 10 so again that makes a number of characters
that I can take as input is 9 only because the last one is going to be reserved for the next character.
So if I will write C and I'd get Lane I have to pass two things first.
The name of the correct baddie and second.
The makes him correct this allowed.
So this is correct.
Now if you will write C not good lane
then no that is E.
So this one e only and the maximum number of quickness allowed is food.
So what will happen.
So in this scenario we can add to Max city 9 characters because the last one is going to be for the
number one.
And in this case at max I can read only three characters because the last one is going to be saved for
the main character.
So let's test this thing.
I will create an eddy of size so size doesn't matter.
This thing my dad so if I would give Dane Patel a while.
Let's say I'm giving Dane Patel a world.
So one thing is very clear saying not good line can easily do this and put this type of input but due
to this food what will happen.
It will read I have to I can only read to correct.
So it will read etch into will read e it will read.
And so h e l and then it will automatically put the electric bill because the mixing of characters is
only four.
So if we would give this input then seen that get will convert it into this one and if it required to
print the content of the array the output is going to be h e l only so do not believe me I will write
the code
so I'm creating an area of this size and lets say the maximum number of characters allowed is only four.
So that means I will read only three characters and I'm giving input as Hello Wade
Hello space word so again the output is only h e l only three characters
you can't see because the mixing and like this is only food.
So this tree and bless one due to 9/11 due to not connected so that's how C not get is much better then
seen.
So both the two limitations.
So this first limitation I've seen that you can give anything as input ABC so you can also give a b
c d e f g you can give anything as input and even if the size of the ad is only fold.
So this was the first limitation of seen and the second limitation was this one that it cannot take
this kind of input.
This type of input so let's say an old guideline is much better than C in now one more thing so senior
get Lane.
For example if you are creating an eddy of size 10 and if you will right.
See.
Kathleen.
And then.
So this is fine.
That makes sense.
It does allow distance and then and the size of the ad is all certain.
So this is correct.
But if you will write C indoor good lane
e and the mixing of classic business hundred if you will write like this then this is wrong because
the size of your ad is actually 10 only.
So how can you store 200 characters.
So this is wrong.
Now we'll discuss that scene not get line takes three barometers so we discussed that the third about
M is optional with that.
Now let us discuss about that optionally barometer and just remember this property that seemed a good
time to stop digging and put as soon as that it will encompass the new line.
Correct.
So actually the third about that the barometer which is option at least the dealing with that connected
so seen not good line.
The first barometer is way too simple.
String name or you can say the name of your correct baddy the second part parameter it is actually the
land.
And the third about Ember is actually are delimited
so this delimiter is actually a architected and by default this character is my new line corrected by
default.
This delimiter character is actually the new line connected.
So this dealing with debt all we can say the breaking point.
So what did I told you above that if you will give the input Hallowell
so senior your claim can read everything but after giving the input Hallowell you will press enter.
So as soon as you press enter what is my deal with that character by default.
So by default it is new line.
So this entered is actually a new name.
So as soon as you print that as soon as you will pass and that so same get lame will stop taking input.
So that is the braking condition seemed to get Lane will stop taking and put and this will be your input
Hallowell.
And obviously you will attach the null corrected.
So this is the third correct.
This is the third parameter which is optional.
So by default if you will not give the third character.
This is going to be the new line connected.
Now what if I want to give the third connected.
So for example what if I want to write C and not get line.
Let's say the name of our arrays input name of character that is input and let's say its size is hundred
and let's say the third character dealing with that correct base.
Oh.
So what will happen to this is all.
So if you will give this input what will happen.
Edge is valid is valid and is valid and less valid.
All C or so it will stop it will stop.
And what do we are input so your input will be actually less less.
And obviously the null corrected.
So this will be your input.
So this is the use of the third parameter so let's see
so I am creating an ideal size ended.
So let's give hundred and the third about a meter which is by default a new length corrected.
Let's say the third about M days only 0 and now I will give the input Hallowell
so I want to give them input Hello space world.
So what will happen my output will be s e l l only so this is my output.
S e n because as soon as it will encounter this all correct but you can see the condition big at all.
So that's why we will only store the first folk as the characters before the character.
So that's why it's e l will get stood.
So I think the C and or good line function is now clear to you and how you can use C and or get main
function so in the next five to do us we will solve some question I will who did Bye bye.