My issue
include <stdio.h>
include <string.h> // Include this header for strcat
int main() {
char x[30] = “Hello”;
char y = “World!”;
// Concatenate y to x (the result is stored in x)
strcat(x, y);
// Print x
printf(“%s”, x);
return 0;
}
My code
#include <stdio.h>
int main() {
char x[30] = "Hello";
char y[] = "World!";
// Concatenate str2 to str1 (the result is stored in str1)
strcat(x, y);
// Print str1
printf("%", x);
return 0;
}
Learning course: Learn C
Problem Link: Concatenation in C