I'm doing an exercise with vectors where I need to read two vectors of 5 positions each, and after that, concatenate these two in a 3 of 10 positions.
My program is printing the first vector correctly, but in the second it prints 4, 5, 5, 2686760, 1987092020 (I think they are addresses).
Here are the functions:
int criaVetor3(int v[], int v1[]){
int v3[10];
for(i=0; i<=4; i++){
v3[i] = v[i];
}
for(i=4; i<=9; i++){ // Começa no 5 elemento do vetor e vai até o 10
v3[i] = v1[i-5];
}
}
int mostraVetor3(int v[], int v1[]){
int v3[10];
for(i=0; i<=9; i++){
printf("O numero posicao [%d] e %d\n", i, v[i]);
}
}