typedef struct listaDocente nodoDocente;
struct listaDocente{ //teacherList
char Rut[12]; //ID
char Nombre[50]; //Name
char Correo[70]; //Email
char Cod_Curso[6]; //Grade_Code
char Asignatura[15]; //Grade_Name
nodoDocente *siguiente; //Next (Node)
};
int main(){
nodoDocente *D = ((nodoDocente * )malloc(sizeof(nodoDocente)));
strcpy(D->Nombre, "Charlie");
strcpy(D->Rut, "18123456");
strcpy(D->Asignatura, "EDD");
strcpy(D->Cod_Curso, "INS123");
strcpy(D->Correo, "charlie@test.com");
printf("%s\n", D->Nombre);
printf("%s\n", D->Rut);
printf("%s\n", D->Asignatura);
printf("%s\n", D->Cod_Curso);
printf("%s\n", D->Correo);
return 0;
}
First, sorry if some words are in spanish. Im trying to print these values but i'm gettin a blank space.
Charlie
18123456
INS123
charlie@test.com
Where it should be printing out EDD, like this.
Charlie
18123456
EDD
INS123
charlie@test.com