I am trying understand how pointers works in C. I am trying a simple case where an array, and a pointer to array are the arguments of a function which will copy the elements of the first one in the second one.
I have written this code
#include <stdio.h>
#define TAM 32
typedef int TablaArray[32];
void copyArray(TablaArray, TablaArray*, int);
void main(){
    int t1[] = {1,2,3,4};
    int t2[4];
    copyArray(t1, t2,4);
    for(int i = 0; i <= 3; i ++){
        printf("%d - %d\n", t1[i], t2[i]);
    }
}
void copyArray(TablaArray t1, TablaArray *t2, int tam){
    for(int i = 0; i<tam-1; i++){
        printf("%d\n", t1[i]);
        *t2[i] = t1[i];
    }
}
I am expecting to get something like this with the printf expression:
1 - 1
2 - 2
3 - 3
4 - 4
But definitely I don't know the way... I have been looking in stackoverflow and because I am sure this trivial question is already answered... but I didn't find it...



