#include <stdio.h>
#include <stdlib.h>
struct developer {
char *name;
char *education;
char *skills;
char *interests;
char *misc;
};
void free_developer(struct developer *d);
int main() {
struct developer jgnacio;
jgnacio.name = malloc(16 * sizeof(char));
if (jgnacio.name == NULL) {
printf("Error: failed to allocate memory for name.\n");
return 1;
}
strcpy(jgnacio.name, "Ignacio Gómez");
jgnacio.education = malloc(58 * sizeof(char));
if (jgnacio.education == NULL) {
printf("Error: failed to allocate memory for education.\n");
free_developer(&jgnacio);
return 1;
}
strcpy(jgnacio.education, "I am a software engineering student at Holberton School.");
jgnacio.skills = malloc(16 * sizeof(char));
if (jgnacio.skills == NULL) {
printf("Error: failed to allocate memory for skills.\n");
free_developer(&jgnacio);
return 1;
}
strcpy(jgnacio.skills, "C, Python, Lua");
jgnacio.interests = malloc(102 * sizeof(char));
if (jgnacio.interests == NULL) {
printf("Error: failed to allocate memory for interests.\n");
free_developer(&jgnacio);
return 1;
}
strcpy(jgnacio.interests, "Keeping up with the latest trends in the technology industry and exploring new programming projects.");
jgnacio.misc = malloc(43 * sizeof(char));
if (jgnacio.misc == NULL) {
printf("Error: failed to allocate memory for misc.\n");
free_developer(&jgnacio);
return 1;
}
strcpy(jgnacio.misc, "opengl, moderngl, nextjs, reactjs, prisma");
printf("Hi, my name is %s and %s\n", jgnacio.name, jgnacio.education);
printf("Most programming languages I use: %s\n", jgnacio.skills);
printf("My interests include: %s\n", jgnacio.interests);
printf("Miscellaneous skills: %s\n", jgnacio.misc);
free_developer(&jgnacio);
return 0;
}
void free_developer(struct developer *d) {
free(d->name);
free(d->education);
free(d->skills);
free(d->interests);
free(d->misc);
}
🇻🇪
Student of Software Engineering at @holbertonschool
-
Holberton student
- Uruguay
Highlights
- Pro
Block or Report
Block or report jgnacio
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned
-
-
-
-
holbertonschool-simple_shell
holbertonschool-simple_shell PublicA proyect of Holberton Schoool. Write a simple UNIX command interpreter.
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.