Come back in this tutorial of even learning about assignment operators in C language.
Ok I see an assignment operator is used for assigning a value to a variable.
Okay.
The most commonly assignment operator is equal to.
On top of it.
There are some other operator assignment operators which are available in C Okay so which can be used
in the program in order to manage blend the value of a variable.
Okay so now if you see here this is one of the example how we can use that same operator and a bit similar
to this one for example plus equal to can get an S E plus equal to B or this value can Britain s equal
to if the speech all the same so frightening Atlanta expression.
So we can use this kind of short and you know in C language okay but just remember one thing plus equal
to means.
Do remember this assignment operator will always have a lease precedence than any other operator except
semicolon.
OK just take note of it and I will explain to you for the unity release because our bodies operators
with the help of the program in the next section.
OK here's an example.
As I told you earlier in the program will always start from the main function.
OK so here I am taking two variables.
OK.
B and E and I have initialized the value of b with two.
OK so and am I assigning I'm using the first to operate properties equal to what I mentioned as a b
I'm assigning to a which means this value.
This value will be assigned to it which means when I tried to print it again the value of it should
be two because years it was not insulated.
Just decline here and thereby sending a value equal to do with a variable called B.
And again here I am used with the help of this assignment operator I'm just assigning this b value to
every variable so when I printed it it should print test.
OK so I'm just ending it and I'm using the second operator which is the plus equal plus equal to here.
What happens is like a plus equal to be means as I mentioned here as I mentioned here you can write
in this fashion as well.
So I'm just writing this fashion so make it more clear.
So currently the value of it is 2.
Okay so here it is two random plus B which means this do we are the insulation here.
So the value of this operate operation is like it should before.
I guess I mean when we printed it should be free because I mean everybody get equal to AA plus me which
means it's already to these two so ably plus B is called for.
Okay.
So we're not printing yet so she should bring forth too.
So now we are coming to the toll the assignment operator which is a a minus equal to B.
OK so this one and we're discussing about this one now.
So here if you see this can be written as equal to it can return equal to a minus B.
Okay.
So if you see here is already for just four minus B which is two.
So the output should be two.
Okay.
So when I printed this assurance 2.
Okay.
No is that equal to be.
So this can be written as equal to yesterday.
So E is all you do here.
So to multiply before.
Which is total 2 the four.
So this form should be printed here and then a title printed in the second set.
Okay.
So now you both divide up after this particular row.
Okay so here what I'm going to do is here what I have written here is a slash equal to B.
This can be written in this in this fashion itself so to make it more clear I just suddenly get an s
like this which is equal to a slash B.
OK so A's for now here this value for and B is 2.
Okay.
This is too actually.
So now what I'm doing what I'm doing is like I'm dividing 4 by 2 so to lose a force.
So what will we do if we use this and divide up data.
OK so the output will be two when we execute the program.
OK.
Now we're going to teach this course about the modulus operator.
So this can be and we've had to declare this fashion and this already equal to equal to the end of a
modulus B.
So the values 0 so modest means like it should do the remainder of it for example like for example if
I divide 5 by 2.
So to do so for the remainder is the balance is what it gives the remainder section.
OK.
So here if you if if you see here easily redo now it can be used to now.
So if we divide by this one there's nothing to do two ones or two.
So there is no balance difference at three.
For example if E's three then gives it a man that's one balances one.
Okay so let's see competency what happens now.
Okay string an error let me see what it is
okay.
Again a string in a row.
So here is precisely matching whatever I mention it is.
Do you go for a quarter to then a quarter for an equal to do.
Then he had equal zero
is straight A's so this how we have to use this assignment but it doesn't see language.
So thanks for watching.
We'll catch up into a discussion.
My final.