So now moving to the next slide, we will be discussing more data types, so data types, we need to
use a lot of data types in our programs because the programs, all the programs may be actually working
on data, right?
We in computers, most of our activities are concentrated on data.
How we can add data.
How we can subtract data, how we can divide data.
That's about digital data.
That means then that no data.
Similarly, we have a lot of data, other data types like if I have a kind of a name, that's also data,
but we cannot write my name Aljunied as indigenous.
It can be written as only Gattaca, so we should need another data type so that set GAD database.
So as the name suggests here, data tables represent the type of data which we can process use are using
our computer program, so it can be new money data if I numeric database and more data disseminating
any kind of data.
So in order to represent any kind of data, you say database.
So here are some examples.
So these are the popular data types associated in C++ language, so you can see anybody yet in my number,
equal to fight.
So it's integer data which actually shows all no the number without a decimal point.
Then we have flawed data point, which which means like the number can be decimal numbers.
So that's right.
So if we are handling numbers which can be having decimal points, then we can use flawed as well as
double.
If it is having a lot of decimal like values after decimal points, then we will be using that.
Then if you are handling that, it goes like names, strings, etc. Then we can use that database.
Then we have more data, which actually we use for storing that.
True or false value?
If somebody says something is true began as saying that medium were true, then that kind of variable
should be having more data.
Then we have string it set new data, which is added in C++.
It was not in C programming language, so spring data types can store a lot of characters to get a parting
gift of gab that I began, or at least not one Garrick that I did.
I.
So here are the popular data types in C++ we are handling.
So here these are the data types.
So if we are like writing a program and if I want to introduce a new variable to the computer, I will
be using a data.
I suppose I want to add two numbers.
And one is I have to know what kind of numbers it is.
So it will be like the ACIDES number.
And just adding two numbers means like five I need.
It's not having any kind of decimal places so I can be glad to integer available so I can use the statement
in a comma b semicolon.
This means like my variables and we can call numbers similarly for each and every day day, which we
use in program each and every variable which we use in program, we should identify the database and
declare those variables at the beginning or anywhere in the program.
So in previously, in the case of C programming language, you should define all the variables in in
the beginning itself.
But when it comes to C++, you have a choice to define the data type anywhere in the program by just
before using that variable.
You have to define its data type.
So here you have the list of data types, and especially today, results are there to specify.
There is nothing associated with the variable that is more data type.
It's quite an empty data type.
It means there is nothing associated with their variable.
Then it's set with that type suspicion data like.
So how are we going to declare any edible, that's what we are showing here.
So we have died for our right to be able to name so it.
Some.
In.
Alien like that.
And we get our show while declaring the variable it means like that variable is not still used in the
program, but we are actually introducing that variable to that computer compiler.
So if you want to give a value to a variable while we are declaring it in Scala initialization, so
we insulates the material in two ways.
One is that after declaration, you can initialize the variable.
Another means like during the declaring it said it, we get initially estimating with so I am if I want
to get a variable card to say which is of integer time and I want to send that answer or I one Gorseinon
value five in it, I can do like this.
So in and I say equal to file.
So that's indexes data type variable and I'm equal to value that design assignment summer.
Now we have constants.
So constants are also variables, but that value will not change in the program.
Once you decide on sending a program, it will remain the same.
We cannot change the value of that function.
If we are trying to change the value, it will result in any error.
So here you have like two ways to declare equal understanding that this using hash defined pre-processed
that we have already started about hashing it set free preprocessor, right?
So it's having a specific meaning which will tell the compare that to include all of that associated
modifiers needed for executing that program.
Similarly, we have another process of not acting that discard hash leaving, so hash defined is used
to create constants.
So if I want to create a Guanzon card by then, I can just write hash define.
By three point one four.
So then it will actually create their clients and by with the value three point four, which cannot
be changed.
Another means using constant keyword Gonski work.
So launched the attack right then the variable name, then equal to that value.
So this is another way of declaring it constant.