Top

Discussion

This function offers the quickest way to determine whether two character sequences of the same known length match character for the character up to and including any null character in both.

  • A.strcmp()
  • B.memcmp()
  • C.strncmp()
  • D.no such function

Answer: C

The strncmp() function is used to compare not more than n characters (characters that follow a null character are not compared) from the array pointed to by one, to the array pointed to by other.

No comment is present. Be the first to comment.
Loading…

Post your comment