I have an array of integers and an array of chars.
int A[5] = {12, 23, 12, 32, 12};
char B[5] = {'a', 'e', 'd', 'y', 'i'};
I want to concatenate the two in order into a new array called
char P[5];
I want to output to be
p[5] = {12a, 23e, 12d, 32y, 56i}
So far I tried using snprintf but it runs into segment fault and abort trap 6. Is there a simpler way to do this ?
[4]-->[5]2)char P[4];-->char *P[5];