What is the function to concatenate two strings?

20252025

What is the function to concatenate two strings?

Answer: D. strcat()The strcat() function takes two strings as arguments and appends the second string to the end of the first string. It modifies the first string in place and…

  1. A.

    stradd()

  2. B.

    strcon()

  3. C.

    strjoin()

  4. D.

    strcat()

Attempted by 239 students.

Show answer & explanation

Correct answer: D

The strcat() function takes two strings as arguments and appends the second string to the end of the first string. It modifies the first string in place and ensures the resulting string is null-terminated. This function is part of the C standard library and is commonly used for string concatenation.

Explore the full course: Hexaware Preparation

Loading lesson…