In C you can use the strcat function to concatenated two strings
concatenate pointer string:
/*
Example:concatenate strings in C language
*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
char *str = "hello";
strcat(str, " world!");
printf("%s",str);
return 0;
}
The strings are saved in an array:
/*
Example: how to concate strings in C language
*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
char str[40] = "hello";
strcat(str, " world!");
printf("%s",str);
return 0;
}