Why is output of this code
1234567890asdfg
asdfg
(i can't use string class)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct S
{
char a[10];
char b[20];
};
int main()
{
struct S* test = (S*)malloc(sizeof(S));
strcpy(test->a, "1234567890");
strcpy(test->b, "asdfg");
printf("%s\n%s", test->a, test->b);
return 0;
}
struct S, not justS, in C.