Skip to content

Commit

Permalink
Se agregan los datos del alumno FIGUEROA, Nahuel
Browse files Browse the repository at this point in the history
  • Loading branch information
Nahuel Figueroa committed Apr 14, 2021
1 parent a9a87dc commit 41a22b0
Show file tree
Hide file tree
Showing 3 changed files with 18 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 @@ -45,6 +45,8 @@ bool AlejandroPermingeat(char * cadena, size_t espacio);

bool EstebanVolentini(char * cadena, size_t espacio);

bool NahuelFigueroa(char * cadena, size_t espacio);

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

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

bool NahuelFigueroa(char * cadena, size_t espacio) {
const struct alumno_s alumno = {
.apellidos = "FIGUEROA",
.nombres = "Nahuel",
.documento = "39.996.762",
};

return SerializarAlumno(cadena, espacio, &alumno);
}

bool AlejandroPermingeat(char * cadena, size_t espacio) {
const struct alumno_s alumno = {
.apellidos = "PERMINGEAT",
Expand Down
6 changes: 6 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
int main(int argc, char *argv[]) {
char cadena[128];

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

if (AlejandroPermingeat(cadena, sizeof(cadena))) {
printf("Alumno: %s\r\n", cadena);
} else {
Expand Down

0 comments on commit 41a22b0

Please sign in to comment.