From 1bf6b36b6693a524fd896e24db2f261b36986abb Mon Sep 17 00:00:00 2001 From: jdalvaradocol <80493134+jdalvaradocol@users.noreply.github.com> Date: Sat, 10 Apr 2021 13:07:02 -0500 Subject: [PATCH] Se agregan los datos del alumno Alvarado, Jose" --- inc/alumnos.h | 2 ++ src/alumnos.c | 9 +++++++++ src/main.c | 12 ++++++++++++ 3 files changed, 23 insertions(+) diff --git a/inc/alumnos.h b/inc/alumnos.h index a678a88..0eb487f 100644 --- a/inc/alumnos.h +++ b/inc/alumnos.h @@ -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]===========================================================*/ diff --git a/src/alumnos.c b/src/alumnos.c index 1f51da1..0c61144 100644 --- a/src/alumnos.c +++ b/src/alumnos.c @@ -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 = { diff --git a/src/main.c b/src/main.c index 976b89c..9d52a4f 100644 --- a/src/main.c +++ b/src/main.c @@ -9,6 +9,10 @@ /*=====[Inclusion of own header]=============================================*/ + + + + #include "alumnos.h" #include @@ -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; } \ No newline at end of file