Which of the following standard functions accepts two arguments while calling?
-
Strspn();
-
Strnset();
-
Strnsetu();
-
Strdup();
-
Strncpy();
A
Correct answer
Explanation
This option is true because this function takes two arguments and this function returns the position of the string from where the source array does not match with the target one.
Format of this function is :-Strspn( string 1, string 2);
For example suppose we enter first string as “good morning” and second string as “good luck”.
So the function will return 5 because after 5 characters there is no match found in the strings.
So this is the correct option.