Computer Science, asked by Sayyedsumehra6828, 7 months ago

Define a function that can accept two strings as input and concatenate them and then print it in console.

Answers

Answered by venkyDadsena
2

Answer:

using strcat() function we can concatenate two strings.

Explanation:

for eg.

#include <stdio.h>

#include <string.h>

int main()

{

char a[1000], b[1000];

printf("Enter the first string\n");

gets(a);

printf("Enter the second string\n");

gets(b);

strcat(a, b);

printf("String obtained on concatenation: %s\n", a);

return 0;

}

Similar questions