当前位置:文档之家› COMP5212_Software Construction_Semester1_2012_Tutorial_week6

COMP5212_Software Construction_Semester1_2012_Tutorial_week6

COMP5212_Software Construction_Semester1_2012_Tutorial_week6

Week 6 Lab

This week we start on the C language. First we look at the process of compiling and running C program and then the main differences between Python and C.

Compiling a C programme

Unlike python, C programs are compiled. This means that the C program is first translated into machine instructions using a program called a compiler and then the machine code file is executed. With Python the program is compiled into virtual machine instructions and then interpreted in a single step, while running a C program involves two separate steps: compiling and running.

To get a C program running you first must prepare the source code of your program using a text editor (we'll explore a few different editors in class), then compile the program using the gcc command, and then execute the resulting binary program.

相关主题
文本预览
相关文档 最新文档