Answers for "how can i concatenate a char and a string c"

C
32

c concatenate strings

char str[80];
strcpy(str, "these ");
strcat(str, "strings ");
strcat(str, "are ");
strcat(str, "concatenated.");
Posted by: Guest on March-22-2020
1

concatenate char * c

#include <stdio.h>
#include <string.h>
int main()
{
    char destination[] = "Hello ";
    char source[] = "World!";
    strcat(destination,source);
    printf("Concatenated String: %s\n", destination);
    return 0;
}
Posted by: Guest on April-02-2022

Code answers related to "how can i concatenate a char and a string c"

Code answers related to "C"

Browse Popular Code Answers by Language