Skip to content

Commit

Permalink
Se agregan los datos del alumno Alvarado, Jose"
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalvaradocol committed Apr 10, 2021
1 parent 0f165e5 commit 1bf6b36
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/alumnos.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ bool EstebanVolentini(char * cadena, size_t espacio);

bool LucasOrsi(char * cadena, size_t espacio);

bool JoseAlvarado(char * cadena, size_t espacio);

/*=====[Prototypes (declarations) of public interrupt functions]=============*/

/*=====[C++ - end]===========================================================*/
Expand Down
9 changes: 9 additions & 0 deletions src/alumnos.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ bool LucasOrsi(char * cadena, size_t espacio) {
return SerializarAlumno(cadena, espacio, &alumno);
}

bool JoseAlvarado(char * cadena, size_t espacio) {
const struct alumno_s alumno = {
.apellidos = "Alvarado",
.nombres = "Jose David",
.documento = "81.740.023",
};
return SerializarAlumno(cadena, espacio, &alumno);
}

/*=====[Implementations of private functions]================================*/
bool JosueElias(char * cadena, size_t espacio) {
const struct alumno_s alumno = {
Expand Down
12 changes: 12 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

/*=====[Inclusion of own header]=============================================*/





#include "alumnos.h"
#include <stdio.h>

Expand Down Expand Up @@ -100,6 +104,14 @@ int main(int argc, char *argv[]) {
printf("No se pudo serializar el alumno\r\n");
}

if (JoseAlvarado(cadena, sizeof(cadena)))
{
printf("Alumno: %s\r\n", cadena);
}
else
{
printf("No se pudo serializar el alumno\r\n");
}

return 0;
}

0 comments on commit 1bf6b36

Please sign in to comment.