Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Julian Nahuel Vidal
orga2 grupo5 parte1
Commits
65e8bed1
Commit
65e8bed1
authored
3 years ago
by
Julian Nahuel Vidal
Browse files
Options
Download
Email Patches
Plain Diff
Upload New File
parent
b607426a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
student.c
student.c
+37
-0
No files found.
student.c
0 → 100644
View file @
65e8bed1
#include "student.h"
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
void
printStudent
()
{
/* Imprime por consola una estructura de tipo student_t
*/
student_t
*
studt
=
malloc
(
36
);
unsigned
n
=
sizeof
(
*
studt
)
/
sizeof
(
uint32_t
);
for
(
int
i
=
(
n
-
1
);
i
>=
0
;
--
i
)
studt
[
i
]
=
stack
->
pop
(
stack
);
printf
(
"%s
\n
"
,
((
*
student_t
)
studptr
)
->
name
);
printf
(
"%d
\n
"
,
((
*
student_t
)
studptr
)
->
dni
);
printf
(
"%d
\n
"
,
((
*
student_t
)
studptr
)
->
califications
);
printf
(
"%d
\n
"
,
((
*
student_t
)
studptr
)
->
concept
);
printf
(
"%s
\n
"
,
"----------"
);
}
void
printStudentp
()
{
/* Imprime por consola una estructura de tipo studentp_t
*/
studentp_t
*
studtp
=
malloc
(
28
)
unsigned
n
=
sizeof
(
*
studtp
)
/
sizeof
(
uint32_t
);
for
(
int
i
=
(
n
-
1
);
i
>=
0
;
--
i
)
studtp
[
i
]
=
stack
->
pop
(
stack
);
printf
(
"%s
\n
"
,
((
*
studentp_t
)
studtp
)
->
name
);
printf
(
"%d
\n
"
,
((
*
studentp_t
)
studtp
)
->
dni
);
printf
(
"%d
\n
"
,
((
*
studentp_t
)
studtp
)
->
califications
);
printf
(
"%d
\n
"
,
((
*
studentp_t
)
studtp
)
->
concept
);
printf
(
"%s
\n
"
,
"----------"
);
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment