I have this function which purpouse is to "separate" numeric characters and letters in 2 arrays and then printing them.
char separa(char arr[MAX_CAR-1]){
char alpha[MAX_CAR];
char num[MAX_CAR];
int schiavo,schiavo2,schiavo3;
int j=0;
int k=0;
int f=0;
int lunghezza =strlen(arr);
for (int i =0;i<lunghezza;i++) {
schiavo = 0;
schiavo2 = -2;
schiavo3 = -2;
schiavo = isalpha(arr[i]);
schiavo2 = isspace(arr[i]);
schiavo3 = isdigit(arr[i]);
if (schiavo != 0 && schiavo2 == 0) {
alpha[j] = arr[i];
j++;
} else if (schiavo3 != 0 && schiavo2 == 0) {
num[k] = arr[i];
k++;
} else if (schiavo2 != 0) {
f++;
}
}
}
So the thing is that i am supposed to print those arrays in the main but i have no idea how to return them, i've tried reading forums about using pointers but i can't understand how it works for arrays
I even tried to return 1 array per time instead of 2 but even that didn't work