-
-
Save goakley/4669918 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
/* TODO: resume.h */ | |
typedef struct { | |
char * company; | |
char * location; | |
char * title; | |
time_t started; | |
time_t left; | |
char * accomplishments[]; | |
} job_t; | |
typedef struct { | |
char * school; | |
char * location; | |
char * program; | |
time_t started; | |
time_t left; | |
char * accomplishments[]; | |
} school_t; | |
typedef struct { | |
char * project; | |
char * title; | |
time_t started; | |
time_t left; | |
char * description[]; | |
} project_t; | |
/* Contact Information */ | |
char * name = "Kevin R. Lange"; | |
char * email = "[email protected]"; | |
char * address = "1045 Mission St, Apt 440\n" | |
"San Francisco, CA 94103"; | |
/* Education */ | |
school_t uiuc = { | |
.school = "University of Illinois at Urbana-Champaign", | |
.location = "Urbana, IL", | |
.program = "BS Computer Science", | |
.started = 1251158400, | |
.left = 1336608000, | |
.accomplishments = { | |
"Minor in International Studies in Engineering, Japan", | |
"Focused on systems software courses", | |
NULL | |
} | |
}; | |
school_t hit = { | |
.school = "Hiroshima Institute of Technology", | |
.location = "Hiroshima, Japan", | |
.program = "Study Abroad", | |
.started = 1274745600, | |
.left = 1278288000, | |
.accomplishments = { | |
"Cultural exchange program", | |
NULL | |
} | |
}; | |
/* Projects */ | |
project_t compiz = { | |
.project = "Compiz Window Manager", | |
.title = "Developer", | |
/* ... */ | |
}; | |
/* Employment History */ | |
job_t apple_internship = { | |
.company = "Apple Inc.", | |
.location = "Cupertino, CA", | |
.title = "Software Engineering Intern", | |
.started = 1306886400, | |
.left = 1314662400, | |
.accomplishments = { | |
"Built software framework for testing and verification of desktop retina display modes", | |
"Assisted other interns in doing stuff.", | |
"Foo bar", | |
NULL | |
} | |
}; | |
job_t * jobs[] = { | |
&apple_internship, | |
NULL | |
}; | |
/* TODO: resume-main.c */ | |
void print_job(job_t * job) { | |
char started[100]; | |
char left[100]; | |
struct tm * ti; | |
int i = 0; | |
ti = localtime(&job->started); | |
strftime(started, 100, "%B %d, %Y", ti); | |
ti = localtime(&job->left); | |
strftime(left, 100, "%B %d, %Y", ti); | |
printf("%s at %s\t\t%s\n", job->title, job->company, job->location); | |
printf("%s to %s\n", started, left); | |
while (job->accomplishments[i]) { | |
printf("- %s\n", job->accomplishments[i]); | |
++i; | |
} | |
} | |
int main(int argc, char * argv) { | |
int i = 0; | |
while (jobs[i]) { | |
print_job(jobs[i]); | |
i++; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment