I guess Mr. Iharob already answered your question, but just to elaborate a bit more,
Let's see the man page of strcat(). It says,
char *strcat(char *dest, const char *src);
which means it expects both the arguments to be pointer to strings. Now, as we know, a pointer to int array cannot be considered a string, we cannot use strcat() directly in your case.
So, what you have to do is,
- Take another buffer
- Copy both the contents of the
char array and int array elements for particular index one after another in lexicographical format, so that the final result is the concatenation of both.
Now, you have sprintf()/ snprintf() to help you out in this case. It prints the formatted o/p to the supplied string.
A pseudo-code
char letter[100]; //populating value, not shown
int number[100]; //populating value, not shown
int i = 0;
char letterNum[100][32];
for (i = 0; i < 100; i++){
if ( sprintf(letterNum[i], "%c%d", letter[i], number[i]) != 2)
printf("Error in %d iteration\n", (i+1));
}
string array? [Hint: you already toldchar array]