Hi guys.
Welcome back.
In this tutorial we are going to discuss on the commonly used in functions and C in C has various string
functions.
Okay but in this lesson we are going to discuss only about four inbuilt distinguish functions which
we are going to use in the upcoming programs quite often.
Okay so the first one which we are going to discuss is string copy.
This is the function.
The second one is string length.
The third one is string cat.
And the fourth to any string come back.
OK so string copy string length string concatenation Austin cat Austin competition or string s2 RCMP.
Okay so we will this goes along with the help of a program.
Okay.
And Sting copy.
This function copies the string to the under character.
Okay.
And this is the basic syntax.
This is the type and string copy and within the bracket the destination source.
The stream copy function.
Copy the string pointed by source which means this value included an all character to the character
at a destination dysfunction it is character at a destination which means like here.
Here it is.
That is Nisha.
And this is a source of what a value this variable will hold will be copied to this to this particular
variable.
So this is the source and this is the destination.
So at the end of this program when you print this value so it can it will print the same value as this
one actually which means we are copying it would override the value of this nation the source value
will be overwritten in this nation variable by using this function.
Okay so we will see further with the help of the program.
If you see here as usual the existing dot hedge strings are your dot hedge.
Input Output Dot had to fight which we discussed in the illustration here I've added one more and different
coaching dot here and the reason is I'm using an inbuilt function which is defined in this header frame.
OK so that's why I'm adding this particular to profile in this program.
OK so we have this because in the earlier sessions this is the V hole to declare and initialize a string
value.
So here I am holding I'm having two variables this year one and issue two with the character type and
I'm holding in that the area of strongly and I have insulated the value of Dennis to this particular
variable instead of 1 and am initialized instead of one more variable Carter estimate over the value
for cheap.
OK so here as I told you earlier we're using this testing copy function we can copy.
This is the source and the destination whatever value is available in this variable will be copied or
overwritten to this particular string value which means when I printed this this string one should should
print the value of string.
Okay Mr. G.
Okay.
Again I'm repeating I have two variables.
String one string toasting one having sliced it with Dennis and string two I have initialized with Richie
so and I'm copying the value of free cheese destined to be a step one which means Richie should be over
gentle instead of one.
Okay so this value will be copied to this gentleman.
So when I printed Step 1 it should print the value of Origin.
Okay so it returns zero which is a normal definition for a C program.
Okay.
So let me compile this and see what is the output.
Instead one is Dennis instead to G.
I copied it still to this day when I am printing instead one which is richer.
Okay suppose I'm giving an out of the named card.
Steven and I have I'm giving you another very quietly that gets Okay so let me go decency
I have the first string I have mentioned as Steven the second string as Bill Gates again I'm copying
this value to this particular variable with the help of seeing copy function and then printing this
string one variable which is Bill Gates which means this values are copied toasting one variable.
So it is how we can use this string copy function in C programming language.
So thanks for watching this with you guys.
I'll catch you guys again in and out of that video.
Bye for now.