Given the code below, I wonder why the second printF of the LeAluno procedure does not print correctly?
#define MAX 3
typedef struct aluno{
int matricula;
float notas[2];
} Aluno ;
int t=1;
void LeAluno(Aluno *Param){// com ponteiro
t++;
Param->matricula=10*t;
Param->notas[0]=20*t;
printf("\n 1 %f",(*Param).notas[0]);
printf("\n 2 %f",*(Param+sizeof(int)) ); //size of int matricula;
Param->notas[1]=30*t;
}
void main(){
int i;
Aluno Turma[MAX];
for(i=0; i< MAX; i++)
LeAluno(&Turma[i]);
}