Welcome back.
In this session we are going to learn about ice.
Okay first of all what is it not a game.
All right is a group or collection of similar types.
Okay.
For example an integer 3 holds elements of integer types violent character Ari holds elements of character
types.
Okay now we'll see Holder declare that a okay.
There's a basic syntax you need to specify the data type space that any on this size.
Okay.
Here if you see in this example have used in space in New York.
Then square brackets Denton.
I didn't do anything with the genotype any M is a thing with a variable on it can hold 10 elements.
Okay then elements of integer type only.
Okay please note 10 elements of integer that I believe can hold the second row.
This is the declaration of a declaration to hold the capital values c h ere is CAGR is that right.
And C hitches a variable and it can hold in any means.
Okay so in case of a integer can hold or lick in digit delta values that is character can hold only
character values.
Please note a character cannot hold integer value whereas an integer also can't hold a character.
So it should be it should be on the same type.
Okay.
It cannot be a mixture actually.
Okay so this at a any it can contain an array of fringe elements.
This character Eric and contain every element array of characters certain elements.
These are a subscript or index to access any element stored in a subscript stored sorted subscript starts
with 0 which means array of 0 percent the first element in an Adi engendered error and minus one can
be used to use the intelligent of fanatic that is and isn't any integer number.
OK so for example if you want to access the value of the first element.
OK so you need to use a rebated the variable name.
It's called bracket 0 value of 9 will hold the 10th element often at a at a value.
Okay so you do all this in number like if you want access the first element of an array.
You should use variable name square brackets zero to access the first element if you want access the
last element.
Then you have to know you and you need to minus one for example if you declare the standard issue you'll
be in minus one we just 9 9 will contain the tenth element of an added value added added value.
Okay so for example if you have a fight for example declared this as a fight then.
I do that I do value affordable content the last element of added added value.
Okay now we will learn how to insulate NRT Okay.
Begin insulation at a during declension itself.
And this is the basic syntax how to insulate the NRA so your lived in the previous slide we have seen
how to declare it.
This is it is the syntax Holder declaring that in that speech the variable name is guided by it and
how many elements you want.
So for example if I want to file elements I I'm declaring that a bit the.
So if you want to initialize it is a syntax equal to then curly curly braces.
Then you can put your.
You can store your values like 5 10 15 20 25 or whatever it is.
OK.
It is the format and all how to store Holder initialize value to the right.
Okay so there is one more.
Actually if you don't want to specify the size actually then you can just leave it as empty.
But even if you are not specify the size the C compiler knows it's 5 5 values as it is insulating it
with fi elements so it will allocate the space accordingly.
OK so there are two ways either you can specify the size or you can leave it as MVC compatible but to
be based on the values and you'll automatically get the memory in NC.