Hello and welcome to the and programming language course in the previous session, we talked about sorting
of a slice.
And in this session, we want to talk about the authors.
It's nice concepts.
Copy one is those items into another, it's nice and golden, it built in copy function is used to copy
data from one it's nice to one another.
Now, go to this good program to illustrate how to copy one of those items into another slice.
First, create a smaller slice and initialize it for the example, a column he calls square brackets.
Time is gained and initialize value by 10, 20 and 30.
Go to the next night and this display, even if he is less.
He can set the variable in a and go to the next line display length and capacity of a value that if
there is a slice, a length is persons D and
the column first, then the back is less an opening and display the length and capacity of variable
eight by two functions Len and Jack lend a hand, share the reform and save the projects.
Now create a bigger slice, then offer a slice we use from make function to create is nice b and don't
initialize it for the example B column equals make function and type is aimed at length is five and
capacity is ten and don't assign any values to be evaluated.
Now go to next line and use copy function for copy s noise eight inside a slice b copy and B Command
A Now go to the next line and display variable B after copy.
It's nice.
18.
Say this nice b if he hits Slice B B and go to the next line and display length and capacity of value
to be f f is nice the length per cent d and capacity column person D.
And displayed the length and capacity of many will be by two functions lane and chat.
Then B. and Shad be reformed to quote, save the project and execute the program.
Now we can see the output for Nice A.
The values are 10 to 30.
And length is three and capacity is three.
And then we defined variable without initialize the value and copy a inside B and it's nice.
B have the values 10, 20, 30 and length is five and capacities 10.
Now we could copy one as nice items into another slice and go golden in order not to prolong the time
of decision.
We will finish it and we will continue the content in the next session.
Goodbye.