Computer Science, asked by Saketss9015, 1 year ago

If the function strcat(s1,s2) is implemented , then the concatenation will return?
a) s2 at the end of s2
b) s2 at the end of s1
c) s1 at the end of s2
d) s2 at the start of s1

Answers

Answered by aditya1984
62
b) S2 at the end of s1
Answered by steffis
13

s2 at the end of s1 is the return value when function strcat(s1, s2) is implemented.

Explanation:

The 'C library' function strcat(char *dest, char *src) is used for concatenating two strings.

The syntax for strcat() function is "char *strcat(char *dest, const char *src)".

The parameter 'dest' is a pointer for the destination, which must have a 'C string', and should be adequate to hold the resulting concatenated string. The parameter 'src' is a string required to be concatenated.

The 'strcat()' returns a pointer to the resulting string dest.

Similar questions