how to combine strings in c

#include <stdio.h>
#include <string.h>

int main() {
    char str1[50] = "Hello, ";
    char str2[] = "world!";
    char result[50];

    // Step 1: Copy the content of str1 to result
    strcpy(result, str1);

    // Step 2: Concatenate str2 to result
    strcat(result, str2);

    // Step 3: Print the combined string
    printf("%s", result);

    return 0;
}