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

Discussion

Which function will you choose to join two words?

  • A.strcpy()
  • B.strcat()
  • C.strncon()
  • D.memcon()

Answer: B

Correct answer: strcat()

strcat() appends the second string to the end of the first, overwriting the first one’s terminating null and adding a new one. strcpy() would replace the first string rather than extend it, and the other two names do not exist. The destination must have room for both.

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

Post your comment

Please log in or register to post a comment.