I welcome everyone to the new unit of our C++ programming tutorials.
So let's start with any new topic today, so we are going to discuss regarding data types and control
statements in C++.
So let's dive into the topic.
So there are a lot of components in our C++ programming language, which actually constitutes C++ programs,
and we call these components all kinds.
So talking about tokens, we have mainly five tokens in C++ programming language.
So the names are keywords, variables, constants, special characters and operators.
So these are the five main tokens in C++.
So when we write this C++ programming language, some kind of programs in this language, we will be
using a lot of tokens, which are these components which actually constitute a snap program.
So each of the Dogon have a particular usage and why we use the token.
So that's what we are going to discuss next.
So before moving to that, we should know the types of tokens which are actually defined in C++.
So we have keywords which are there to serve words with fake set meanings.
So suppose if we want to declare something or say something to the computer through a programming language,
there should be some words which are reserved which should give that particular meaning to the compiler.
Right?
So these keywords are these words which are served with basic meanings, which can make the computer
to do something are called keywords.
Similarly, we use a lot of variables which other data storage finds in a programming language.
So if we declare a medium where we will be using that variable to actually store some data, so we use
another set of token scoring variables.
Now we do have a third set of tokens, which are called constants whose values will not change throughout
the execution of the program.
So suppose if we declare a constant value in a program toward that start to the end of the program,
the values of that particular constant will not change.
Then we have special anecdotes and operators.
So let's move to each and every of these documents one by one, then you will get more idea on that
Dawkins.
So here C++ have up to like more than 100 the search keywords, which have a specific meaning.
So.
If I'm going to.
Some of the famous Dawkins supports Break.
It's a key word.
So breaking word is used when we want to stop the execution of a program at that particular point.
Then we use break.
So each and every key word listed out here have it fixed meaning and they can do something.
So that's why we use keywords.
So these are the important keywords which we use in C++ programming language.
Now, let's move to special characters.
So some characters which are unprintable, but we use for some some kind of like getting some kind of
action done, those kind of characters in C++ appoint special characters.
Suppose we have single gods and double gods, then we have a backslash team, but then we have none.
Then we have the new line, which is actually slash again, which means to go to any new line.
So using this slash back slash along with this special symbol in whenever the program sees this particular
letter, then it will move to the new line.
So it means like output should be displayed on the new line.
And if it is slash ad, then it will be moving to that carriage.
Similarly, there is a slash D option in C++ that is also a special character, which we can treat as
a special character, which will say to leave some tab space.
So if I am putting.
Slashed in between two letters, so I have slashed, so if I'm putting that between two letters and
B, then whenever that slash deal good, it will leave some space that space between two characters.
So here we have a slash d.
So slash d means if I'm putting slash d, we do not see out of envy, then it will leave a bad space
between envy.
So the display of the output will be like e some space b.
Now, the next point is all protests.
So we have a lot of operators in C++ and each and every operator is used to doing a particular action.
Yeah.
So here you can see at the magic apparatus, we know at the magic of bridges, we all studied mathematics,
right?
So are the magic operators, a plus minus multiplication operator in case of C++, using this X will
not work, so we will use it stat or greater.
That will be like this standard operator.
Then we will be using division operator.
This is the division operator.
Then we have more to do.
Operator This is the smaller operator.
Smaller operator will give you the remainder.
Then we do some division operation.
So to get like a remainder of a division operation, we can use the smaller operator.
All these operators are for mathematical usage, so they are part of the medical practice.
Now we have assignment operators, which is equal to so equal to means.
If we want to say any value to a so that is available today.
And if I want to put the value of equal to five, then we use equal to.
So that is an assignment operator, then we have a comparison operator, we know that comparison means
comparing the values so we have greater than symbol less than symbolic, greater than or equal to symbol.
Right.
So less than or equal in, but then we have greater than or equal blessing, but then we have equal
to sing, then we have not the order by all these symbols that comparison opaqueness.
So we can use this operator to compare to that.
And so we have three and we have five.
Oh, we can compare is less than five.
So this is a comparison of operator.
So we have to be able to see and be and we want to compare them then greater than be, we can use that
comparison operator, then we have logical operators.
So what do you mean by logical operators?
So if we want to determine the logic between some values or variables, then we will be using this logic
in operators.
Then we have beat price operators.
So these are the important operators we use in C++.
So let's see logical operators.
So we have mainly we have.
And logical operator.
All logical operator and.
Not logical, so and logical operators to Anderson seem right, so this operator we used to compare
check the conditions of like two conditions if two conditions are true.
Then and will result in a true man.
So this and oppression and on, we'd be having a detailed look in future while we are on progress so
calmly like the basic understanding we should harvest and is used to compare two conditions.
And if both conditions are true, then only and we return returning through any and all in this all.
Or if like I can show you somber assessment for easiness you're greater than be.
And.
Yeah, Great Britain, see, this is an example for using and operator, so this condition will be true
if we're all live in Great Britain, we and the great of Tennessee at the same time, it should be greater
than DNA.
Should we get rid of Nancy, then only this expression is true, which means if five is the value of
B and BS four and CS three.
Then this condition returns at blue value because we have used and because this condition should be
blue and this condition should be also true, then only this will result in true value.
If any of this condition is false, then this condition will be returning.
If value, for example, if sees age, then the second condition is false and false.
Condition is true, but since we have and in between, it will return false.
Right.
So similarly, we have all operator in case of all, operator, it's like two pipe symbols in keyboard,
so you will be able to see dual like a straight line symbol in keyboard.
OK, my straight line is not working well because of my pen and ink nowadays.
But anyway, you will be c seeing it straight line in a keyboard that straight line Escada or operator.
So we use two straight lines that scoring an operator.
So what is the reason we use or operator is like we can check conditions.
If both conditions are true, then our operations will result in approval.
But in case of an operator, if any of the conditions are true, it will return it to them.
So if a greater then B and insert a pen we are using or then if we're grateful, then see the value
of the condition.
This condition is actually true, but this is false.
But still, it will return to value because we are using our operator.
So that's it.
What about the all operator?
Similarly, we have big large operators, but that's not much important, so we can skip that for now.