So hello, everyone, and welcome back to the Gores.
So in the last class, we learned about variables and we discussed our first new day type, which was
and so forth through the tape was and.
And this useful starting in Tejas.
And it requires four bites of space.
So in this glass, we will learn various new types.
And we will learn which their type is used for storing, which type of data and how much space we want
for storing that data.
OK.
So let's get started on that.
Fired new empty failure.
Safe.
OK, so let's name it something.
Various data types.
Nazi CPB save.
Has she include your stream
using namespace SDD?
And then I'm having and mean.
And then return to.
OK, so in the last class, we did something like this and I equals 10, so I is variable here and it
is editor type.
OK.
So I told you, did you type tells us two things.
Which do you do you are storing and how much space you need for storing that data.
In case of and I was taught in teachers and I had acquired four by itself, Speace, OK.
So how do I come to learn that indigence required for virtual space?
So basically is a function size off.
I will give Integer as input and it will give me that integrase for bytes of space.
OK, so let's call it.
OK, so let's see.
And I equals 10.
Okay, so first of all, let us Brindabella, if I see out really off variable I is.
I end an end and now does print size off with Ebele.
See out.
Size of gator type and is.
Size of a plane.
OK.
So what should be my output?
So here, the value of FI is down.
And here my output should be fooled.
OK, so Blenman.
So value of very.
Is 10 and size order type in this food?
OK, perfect.
So I can also here like this.
See old size of.
And instead of writing, I.
I can also write.
And so London.
OK.
So you can see outproduce him forward and for.
Let's come into doubt and here my answer is Dan.
And here, my answer is for.
So in the last class, we added two integers.
And I told you, we want desensitising teachers.
Our teachers will not be too large and it will not be too small.
So it will do.
We will use added a type called and intercourse four by itself memory.
OK, so what if if I want to store small integers?
So we have a two day dive called Short and.
Barton, for example, let's say as equals 10.
It will also store integers, but it requires to buy its own space.
OK.
Now, what if if I want to store large integers so I have a data type called long, long, long, long
and let's say L equals 50.
It will also start in business, but it will take eight bites of space, eight bytes of memory.
OK, so let's write code.
OK, so first of all, let us talk about shorthand short as a close 25 see old value of video as is.
And then see out.
Size of data, type short is so you out the size of S and then only.
Okay, so what you do, my output, so the value of faces go into five and the size of as is two bytes.
OK.
Some are butchered between five and two.
So let's see.
Verlinden.
So the value of variable as this 25 and the size of the type short is two.
Okay, so let's give space between IS and 25.
Space.
Now it is looking good.
Well, your variable as this 25 and size water type is, too.
OK, so you can also write here like this sea out size of Schadt and.
And later, OK, so let's move on.
So he gets here to Endou.
So basically you can ride like this size of S and you can also right size up short and they will without
him.
OK, so here my output is 25.
And here my output is to bite.
OK.
OK, so now let us talk about long.
Long.
OK, so first of all you control C control me.
OK.
So long long and L a close let's say 30 C out really of variable.
L is.
And then end line.
Similarly let us bend the size of long long to type.
So we'll see out.
Size of long, long diapers.
Size of L.A. and then and length.
OK.
So what's your dream, Yardbird?
So the value of L is tarty and sighs of hell is it about.
OK, so let's come then.
So the very low variable list would be and size of long integer type, is it perfectly fine?
And just like above, we can also write C out size of long, long.
And then and.
So come by then.
You're going to hear it and it.
OK.
So it is your choice.
You can ride like this and you can also ride like this.
OK, so here my outproduced turkey.
And in this lane, my output is invite's.
OK, so let's revise again.
So if I want to store small integers, I will use short and short and requires two bites of space.
OK.
So if I want to store these in size integers, I will write and.
It requires four bites of space.
And if I want to store large numbers, then I will use long, long and.
And it requires it by its own space.
OK, so how big and how small integers?
I can store in shorthand.
So basically we will seed in our upcoming windows.
Similarly, how big and how small integers I can store it.
And they will also see this in upcoming windows.
And similarly, how big and how small integers began store in long, long.
We will also see it in upcoming videos.
OK.
So basically, just remember that here I am having to buy two space for and I am having for battle space
and for long, long I am having eight bites of space and the minimum.
And what makes them relevant.
These is again storing this to the dive's.
We will see it in our upcoming videos.
OK.
So, OK, so we have covered Tahlia types till now and Qahtan and long, long and OK, so let us see
some unedited types as well.
OK.
So for example, can I write like this and I equals one point two three.
Can I write like this?
No, obviously not, because it can only store integers, individual type can only store integers and
one point two three is not an integer.
So we need an editor type to store when.
One, two, three.
Okay, so we have to digitize that can store floating values.
So this is known as floating values and we have to do the dives that can store floating values.
So I have fostered a type of float flawed F equals 1.0 three.
And I have one more data type that can store floating values.
So double the equals.
One point two, three.
Okay, so floor these are two.
The type that will is also the type both store floating values.
So what is the defense?
Defense is very simple.
Flawed requires four bites of space.
And W need gigabytes of space.
OK.
So just like short term and longer and float has a smaller range and that will has a larger range.
OK.
So since Float has four by its space, it will store B sensors floating loose and that will has it by
those space.
So it can store big floating values.
Fluid can store small floating wells and double can stored large floating will lose.
Let's see an example.
So first of all, nerds come into doubt and similarly commended.
OK, so let us first talk about fluted, a type so flawed.
If it was one point two, three.
Now, first of all, let us spend the value of F sealed value of variable.
F is C out F and then end line.
OK.
So now let us spend size of to type.
So C out size of flawed data type is.
We will use size function.
And we'll give FS input and then enderlin line.
OK, so what should be my output.
So here the value of Pfeifer's one point two three.
So one penalty should be printed and size of efforts for bytes.
Size of floater diapers.
Four bytes.
So four should be printed.
OK.
So let's see.
London.
OK, so first, let us add this line between long, long and flawed.
So condole, see, and then I am having control.
Okay, so now let us run again.
OK, so the value of variable life is one window, three and size up from dirty diapers, food perfectly
fine.
And just like above, you can also read like this see out size of fluid and line.
So basically size of fef and size of.
What will be some.
Food and food.
Perfect.
So let's come into doubt and hear my output is one point two three and hear my output is four bytes.
OK.
So now let us talk about double digit type.
Okay, so first of all, let's copy and paste condole, see and then control me.
OK, so double B equals, let's say, three point two seven five.
So first of all, the sprint, the value of deep sea out will be of variable.
The is the and then end lane.
And now let us spend size of double digit type.
So see out the size of double digit type is.
I will use a size or function and I will give this input.
And then.
And line again.
So virtually my output.
So I live very simple.
Well do you have variable days.
Three point two seven five.
So three point two seven five should be printed.
And similarly, size of your diapers.
Eight bytes.
So each should be printed.
OK.
So let's come, Ballenden.
So the value of variability is steep in 2005 and signs of double digit diapers.
Eight.
And just like above.
You can also ride like this, see out size of double and lane.
OK, so instead of riding the name of the variable, you can directly write the name of the dinner type.
So compiler then.
Aired here and aired here.
OK, so let's Commander Daoud.
So you'll hear my output is three by two, seven five and hear my output is Edomites.
OK, so now we have covered five debates and short and long, long and flawed and.
OK, so let us see some unedited tapes as well.
OK, so can I add like this, Aaron equals character.
No.
Can I write like this.
Flawed.
F equals.
Correct.
No.
But we need added a type that can store characters and the name of this are diapers, cat GABSI equals
a cat is a different type and that can store characters.
OK, so you can write gang C equals A, C equals B, C equals Connecter one.
C equals character zero.
C was like Tacoma, C calls character space and so on.
OK.
Similarly we can write like this, sequels can per dollar and so on.
Okay, so what is the size of cat.
So the size of cat is one bite.
Okay, so.
Fantozzi controlled me.
OK, so Cav sequels.
Let's say.
OK.
And OK, so first of all, let us spent value of variable C C out value off variable, C is C, LC and
then and Lane.
Now let us spend size of gadget or type.
So C out size of cad digit type is we will use sisal function.
And we'll give C.
S input and then and line.
Okay, so, Richard, we are out.
But okay, so the value of variable C is correctly and sizable.
C is one bite.
OK, so.
And one should be blended.
So let's see, Ballenden.
So the value of variable C is E and size of gadgety diapers when.
And just like, whoa, we can also write like this C out size of cat.
And then I ran it.
So when and when?
Blades, Commander Dowd, and hear me out for days, eh?
And here my output is one bite.
OK, so
so what can happen?
Sometimes you just want to store whether something is true or false.
OK.
So sometimes you want to store whether something is true or false.
So in that case, what will I use?
I will use added a type Bouley.
OK.
So I will write like this.
Bowlby equals true, or you can write like this.
Boole B equals four.
So Bull is it the type that has only two Aleuts?
It will be true or it will be false.
OK, so what is the size of bull?
Sizable is when by only.
OK.
So you can also say blue means one and false means zero.
OK, so let's see.
We'll see.
And then control.
OK, so let's take a variable.
It goes to C out really of variable, B is CLB and then end lane.
And similarly, size of bool Deeter type is used sisal function and give B as input and then end lane.
OK, so virtual real output.
OK, so be close to Proem insulin.
So when we live in turnier assembly size of bees, one bite.
So my output will be one and one.
So let's combine and then.
So value of variable B is when one means through zero means for us.
And similarly, the size of bullying diapers when.
And just like above, you can read like this.
See out size of wood.
OK.
And line.
One bite and one bite.
OK, so let's come into doubt.
OK.
So what will happen if I ride false here?
Foiled.
So nothing will change.
Only the relief will change.
You will be printed here, compile and run and you can see zero is.
OK, we'll have a live very welby's foiled netted zero.
OK, so what will happen if I write and G it quotes Ben and then I am printing Jim.
So what will happen?
So the value of variable J.
Is 10 and I am printing.
Well, your variable J.
So 10 should be printed as expected.
So let's see.
OK, so Dennis printed perfectly fine.
Now, what will happen if I remove this stain?
Now what will be printed?
Now what should be our output?
So let's see.
So when I was writing and I equals Ben Dover, this line was doing, this line was giving me four bites
of space.
I was naming this piece as I and I was putting Ben inside it.
But when I am writing Entergy, then what will happen?
This line will give me four bites of memory.
I am naming this memory as G.
But I am not putting inside it anything.
OK, so I am not putting anybody inside it.
So what will happen if I bring the value of G.
So the answer is anything can be printed.
I am not going anywhere, Lou.
So anything can be rendered.
OK.
So let's see.
So this value is getting printed.
OK, so we call this Ray Lewis garbage.
So what is happening here?
This line is giving me four bites of memory as expected, and I'm naming this memory S.G., but I'm
not putting anybody inside it.
So what is happening?
There will be a garbage value.
OK, so there will be a garbage velu inside this four bites.
And when I am printing G, when I am printing G.
So this garbage value is getting printed.
OK, so let's see one more time.
So this garbage value is getting printed.
OK, so let's see when one example, flawed G, C out G and Lane.
OK, so what should be our output?
Sound output will be a garbage value.
So let's Blandon.
So this is our output, which isn't garbage value.
So this thing happened with a videotape.
So let's see one more example.
Bouley B to see out.
We do.
And then.
OK, so what will be our output to the output will either be a zero or it can be when.
So Boulez's on you two values zero and one.
So anything can be rendered.
Zero can also be printed.
One can also be printed.
So let's run it.
So zero is getting printed.
And let's take one more example.
See, you do see out.
Si do.
And an airplane.
OK, so OK, so which connectivity be painted?
So the answer is any good actor can be rendered any good, which correctly will be Bolinder.
So let's come by.
So bees getting vented.
OK.
So I hope you heard the logic.
What is happening here?
For example, in case of character, I am getting one bites of space and I am naming this piece as you
do, but I am not putting the 10 sided.
Today will be a default data.
And we call this to your tires and garbage.
OK, so why do we call this garbage?
Because it is of no use.
It is of no use for us.
OK, so let's see.
Let us discuss the last topic for today's class.
That is naming off variables.
Naming of variables.
So there are fewer rules.
OK.
So what characters you can use for naming a variable?
You can use small ABC.
You can use capital ABC.
You can use numbers like I have used here.
B to C two.
OK.
OK, so one thing to note here is your variable name cannot start with a number.
So this is wrong.
And this is right.
So your variable name cannot start with the number.
And one more thing.
Your variable name cannot be like.
And first number.
So this is wrong.
You cannot give spaces between your variable name.
You can read it like this.
And first underscore them.
So this is right.
And this is wrong.
OK.
So two things are very important here.
First, you are variable name cannot start with that number.
And second, you cannot give space between yet.
Very big name.
OK.
OK, so that is all for this video.
Thank you.