lecture 14 week4

lecture 14 week4 - Unix C GNU HTML Perl Python Teacher's...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 1 Teacher's Notes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 2 C Compilation Model and Basic Syntax Comp-206 : Introduction to Software Systems Week 4 Joseph Vybihal Computer Science McGill University
Background image of page 2
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 3 Announcements C tutorials soon Ass#1 due Ass#2 out soon
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 4 Part 1 About C
Background image of page 4
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 5 History of C The C programming language was created as a successor for B and BCPL (Basic Combined Programming Language) . It’s creation was parallel to the development of early Unix operating systems (1969-1973). At the time, one of C’s strength was it’s portability. The first widely available description of the language appeared in 1978,The C Programming Language (also known as the little white book). One of C’s most popular successor is C++, released in 1986. Java is also based on C, as is C# and JavaScript.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 6 Programming in C From the user's perspective, building a C program can be broken down in three steps: Writing the program (or source code) Compiling the program Running the program (or executable)
Background image of page 6
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 7 Programming in C Writing the source : Using an editor to write the source. You can use any text editor to write C code. Old-school C programmer often use Unix text editors such as Vi or Vim. For large scale projects, an IDE (integrated development environment) is preferable. Whatever editor you use, it should feature syntax highlighting C programs are usually composed of several source files (we will take a look at this latter).
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 8 Programming in C (cont.) The next step is to compile the program to a format the operating system can run. A compiler is a program that translates one language to another. A C compiler translates C code to machine code. A Java compiler translates Java code to byte code. For this course, we will use the GNU compiler (also known as gcc ). This compiler is installed on all the lab machines and servers.
Background image of page 8
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal Software Systems 9 Programming in C (cont.) By default, the gcc compiler produces an executable file named a.out . On Windows it is name.exe . ( name = anything) You can execute your program by running the a.out file. Don’t forget that a.out must be chmod to executable
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/30/2011.

Page1 / 74

lecture 14 week4 - Unix C GNU HTML Perl Python Teacher's...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online