Multiple choice

Which of the following given standard functions accepts two arguments while calling?

  1. strspn();

  2. strnset();

  3. strnsetu();

  4. strdup();

  5. strncpyk();

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This option is true because this function takes two arguments, and it returns the position of the string from where the source array doesn’t 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 correct.