Machine-translated by Google. Questions are authored in English.
Top

Discussion

The ______ function appends not more than n characters.

  • A.strcat()
  • B.strcon()
  • C.strncat()
  • D.memcat()

Answer: C

Correct answer: strncat()

strncat() appends at most n characters from the source, and always adds a terminating null - so the destination needs n+1 bytes free. The bounded form exists to keep an append from running past the end of the buffer.

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

Post your comment

Please log in or register to post a comment.