BASIC STRUCTURE OFA C PROGRAM C程序的基本结构 Basic Structure of AC Program(Cont.5/5) / Example 1-3(CW01-03C) Print a line of text This is my first c program. * include <stdio. h> int main() printf ("Hello World! return O L Return O 退出函数的一种方法 第一讲〔语言报疹计入门柔
C程序的基本结构 Basic Structure of A C Program (Cont.5/5) BasiC sTruCTure oF a C Program 第一讲 C语言程序设计入门 目 录 /* Example 1-3 (CW01-03.C) Print a line of text. This is my first c program.*/ #include <stdio.h> int main() { printf("Hello World!"); return 0; } Return 0; – 退出函数的一种方法
C PROGRAM DEVELOPEMNT C程序的开发阶段 Phases of c Program Development Edit Editor Prog.c Source file(源文件) Preprocess Compiler Pogo] Object file(目标文件) Compile Libraries Library file(库文件) Link Linker Prog.exe Executable file(可执行文件) Load Loader CPU Execute RAM 第一讲〔语言报疹计入门 目录
C程序的开发阶段 Phases of C Program Development C Program DeVeLoPemnT 第一讲 C语言程序设计入门 目 录 Edit Preprocess Compile Link Load Execute Editor Prog.c Compiler Linker Loader CPU Prog.obj Prog.exe RAM Libraries Source file(源文件) Object file(目标文件) Library file(库文件) Executable file(可执行文件)
C PROGRAM DEVELOPEMNT C程序的开发阶段 Phases of C Program Development (1/4) 口Edt(编辑) Edit Editor Prog.c Program is created in the editor and stored on disk Preprocess Compiler Prog. obj Compile Libraries Link Linker Prog.exe Load Loader CPU Execute RAM 第一讲〔语言报疹计入门 目录
C程序的开发阶段 Phases of C Program Development (1/4) C Program DeVeLoPemnT 第一讲 C语言程序设计入门 目 录 Edit Preprocess Compile Link Load Execute Editor Prog.c Compiler Linker Loader CPU Prog.obj Prog.exe RAM Libraries Edit(编辑) – Program is created in the editor and stored on disk
C PROGRAM DEVELOPEMNT C程序的开发阶段 Phases of C Program Development(2/4) 口 Compile(编译) Edit Editor Prog.c Preprocessor program processes the code Preprocess Compiler creates object code and stores Compiler Prog. obj it on disk Compile Libraries Link Linker Prog.exe Load Loader CPU Execute RAM 第一讲〔语言报疹计入门 目录
C程序的开发阶段 Phases of C Program Development (2/4) C Program DeVeLoPemnT 第一讲 C语言程序设计入门 目 录 Edit Preprocess Compile Link Load Execute Editor Prog.c Compiler Linker Loader CPU Prog.obj Prog.exe RAM Libraries Compile(编译) – Preprocessor program processes the code. – Compiler creates object code and stores it on disk
C PROGRAM DEVELOPEMNT C程序的开发阶段 Phases of C Program Development (2/4) Edit Editor Prog.c Preprocess Compiler Prog. obj Compile 口Link(链接) Libraries Linker links the object code with the libraries Link Linker Prog.exe Load Loader CPU Execute RAM 第一讲〔语言报疹计入门 目录
C程序的开发阶段 Phases of C Program Development (2/4) C Program DeVeLoPemnT 第一讲 C语言程序设计入门 目 录 Edit Preprocess Compile Link Load Execute Editor Prog.c Compiler Linker Loader CPU Prog.obj Prog.exe RAM Libraries Link(链接) – Linker links the object code with the libraries