可讀可執(zhí)行的C語言簡歷源文件
更新時間:2016年07月10日 09:45:32 投稿:lijiao
這篇文章主要為大家家詳細介紹了可讀可執(zhí)行的C語言簡歷源文件,感興趣的小伙伴們可以參考一下
這里黑客新聞嗎?作者用代碼更新了自己的簡歷,是不是很接地氣,特符合程序員的逼格。這是一份可讀可執(zhí)行的C語言源文件,也是作者編碼風格的體現(xiàn)。
C語言天才寫的一份簡歷
#include <stdio.h>
#include <time.h>
typedef struct {
union {
char * company;
char * school;
char * project;
};
union {
char * location;
char * url;
};
union {
char * title;
char * program;
};
time_t started;
time_t left;
char * description[];
} thing_t;
typedef thing_t job_t;
typedef thing_t school_t;
typedef thing_t project_t;
#define CURRENT 0 /* I wasn't alive at the Unix epoch, so that'll work */ /* Contact Information */ char * name = "Kevin R. Lange";
char * email = "klange@toaruos.org";
char * address = "1045 Mission St, Apt 440n" "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,
.description = {
"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,
.description = {
"Cultural exchange program",
NULL
}
};
school_t * schools[] = {
&uiuc,
&hit,
NULL
};
/* Projects */
project_t compiz = {
.project = "Compiz Window Manager",
.url = "http://compiz.org",
.title = "Developer",
.started = 1201392000,
.left = 1264291200,
.description = {
"Minor plugin contributor",
"Various research projects",
NULL
}
};
project_t toaruos = {
.project = "ToAruOS",
.url = "https://github.com/klange/toaruos",
.title = "Lead",
.started = 1295049600,
.left = CURRENT,
.description = {
"Hobby x86 Unix-like kernel and userspace",
"Advanced in-house GUI with compositing window manager",
NULL
}
};
project_t * projects[] = {
&toaruos,
&compiz,
NULL
};
/* Employment History */
job_t yelp = {
.company = "Yelp, Inc.",
.location = "San Francisco, CA",
.title = "Software Engineer, i18n",
.started = 1339977600,
.left = CURRENT,
.description = {
"Developed several internal tools and libraries",
"Provided critical input and design work for Yelp's launch in Japan",
NULL
}
};
job_t apple_internship = {
.company = "Apple Inc.",
.location = "Cupertino, CA",
.title = "Software Engineering Intern",
.started = 1306886400,
.left = 1314662400,
.description = {
"Built software framework for testing and verification of desktop retina display modes",
"Assisted other interns with Unix fundamentals",
NULL
}
};
job_t * jobs[] = {
&yelp,
&apple_internship,
NULL
};
void print_thing (thing_t * thing) {
char started[100];
char left[100];
struct tm * ti;
int i = 0;
printf ("%s at %s - %sn", thing->title, thing->company, thing->location);
ti = localtime (&thing->started);
strftime (started, 100, "%B %d, %Y", ti);
if (thing->left == CURRENT) {
printf ("%s to nown", started);
} else {
ti = localtime (&thing->left);
strftime (left, 100, "%B %d, %Y", ti);
printf ("%s to %sn", started, left);
}
char ** desc = thing->description;
while (*desc) {
printf ("- %sn", *desc);
desc++;
}
}
int main (int argc, char ** argv) {
printf ("%sn%sn%snn", name, email, address);
puts ("Educationn");
school_t ** s = schools;
while (*s) {
print_thing (*s);
puts ("");
s++;
}
puts ("Employmentn");
job_t ** j = jobs;
while (*j) {
print_thing (*j);
puts ("");
j++;
}
puts ("Projectsn");
project_t ** p = projects;
while (*p) {
print_thing (*p);
puts ("");
p++;
}
return 0;
}
網友 Wossoneri 編譯后,我們看到的簡歷

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
相關文章
C語言用循環(huán)單鏈表實現(xiàn)約瑟夫環(huán)
這篇文章主要為大家詳細介紹了C語言用循環(huán)單鏈表實現(xiàn)約瑟夫環(huán),文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2021-10-10
基于C語言編寫簡易的英文統(tǒng)計和加密系統(tǒng)
這篇文章主要介紹如何基于C語言編寫一個簡易的英文統(tǒng)計和加密系統(tǒng),實際上就是對字符數(shù)組的基本操作的各種使用,感興趣的可以了解一下2023-05-05
詳解C語言中的getgrgid()函數(shù)和getgrnam()函數(shù)
這篇文章主要介紹了詳解C語言中的getgrgid()函數(shù)和getgrnam()函數(shù),是C語言入門學習中的基礎知識,需要的朋友可以參考下2015-08-08
C語言驅動開發(fā)之內核通過PEB獲取進程參數(shù)
PEB結構(Process Envirorment Block Structure)其中文名是進程環(huán)境塊信息。本文將通過PEB實現(xiàn)獲取進程參數(shù),感興趣的小伙伴可以了解一下2022-10-10

