code_snippets/c_projects/test_char_pointers/main.c

19 lines
257 B
C
Raw Permalink Normal View History

2024-10-08 01:16:21 +00:00
#include <stdio.h>
int main(){
char *x, *y;
char cat_value[100];
x = "Hello";
y = "World";
int cat_size;
cat_size = sizeof(12 * sizeof(char));
printf("%s\n", x);
snprintf(cat_value, 100, "%s,%s\n", x, y);
printf("%s", cat_value);
return 0;
}