16/1/17, 11 : 05 PM ICT374 Lab 2 Page 1 of 4 ICT374 Lab 2: Introduction to GCC and C Programming Learning Objectives: 1. Learn to create simple C programs with a text editor such as vi or pico ; 2. Learn to compile C programs with gcc; 3. Learn to use the standard library functions printf , fgets , exit etc.; 4. Learn to use standard input ( stdin ), standard output ( stdout ) and standard error ( stderr ). Required Reading: Lecture Notes for Topic 1 LINUX: Rute User's Tutorial and Exposition (or just Rute for short): Chapter 4: Basic Commands. A mini manual for vi editor Access to Software: Internal students will use the lab machines ECL2.039 or ECL2.044 (See Lab 1 for instructions on using the lab machines). You should bring a USB flash drive with you to the lab for copying your files from the lab machine. For external students, if you have already installed Linux, then use your own Linux installation. If you have not yet installed your own Linux, you may use our Linux server (ceto.murdoch.edu.au) temporarily until you have installed the Linux on your machine (see Lab 1 for detail). More information on how to install Linux is available from Download Page of this website. Theory Exercises Stallings (5th Edition) : Problems 1.3, 1.7, and 1.12 (pages 39-40) Stallings (6th Edition) : Problems 1.3, 1.7, and 1.12 (pages 38-39) Stallings (7th Edition) : Problems 1.3, 1.7, and 1.12 (pages 37-39) C Programming Exercises Note, all exercises must be done via the terminal commands, not GUI tools. Do not use any IDE to build your programs. Do not use GUI file managers to manage your directories and files. Also each exercise should be in a separate directory, which itself is under a directory called lab02 1. Use command mkdir to create a new directory named lab02 under your home directory:
16/1/17, 11 : 05 PM ICT374 Lab 2 Page 2 of 4 % cd % mkdir lab02 In the above example, the symbol "%" denotes your shell prompt. Your actual shell prompt may vary. Shell prompt can be configured to whatever you like. The
You've reached the end of your free preview.
Want to read all 4 pages?
- One '14
- current directory, standard input, C standard library