Difference between revisions of "SPO600 Compiled C Lab"

From CDOT Wiki
Jump to: navigation, search
(Created page with 'Category:SPO600Category:Chris Tyler Draft {{Admon/note|Purpose of this Lab|In this lab, you will see the relationship between basic C source code and the output of the C…')
 
Line 1: Line 1:
[[Category:SPO600]][[Category:Chris Tyler Draft]]
+
[[Category:SPO600]][[Category:Chris Tyler Drafts]]
  
 
{{Admon/note|Purpose of this Lab|In this lab, you will see the relationship between basic C source code and the output of the C compiler.}}
 
{{Admon/note|Purpose of this Lab|In this lab, you will see the relationship between basic C source code and the output of the C compiler.}}

Revision as of 18:46, 16 January 2014


Note.png
Purpose of this Lab
In this lab, you will see the relationship between basic C source code and the output of the C compiler.

{{Admon/tip|Ireland|If you do not have a Linux machine with you, you can use ireland.proximity.on.ca -- an account has

Lab 2

1. Write a basic C program which prints a message on the screen, Hello World!-style -- something like this:

#include <stdio.h>

int main() {
    printf("Hello World!\n");
}

2. Compile the program using the GCC compiler. Include these compiler options:

-g               # enable debugging information
-O0              # do not optimize (that's a capital letter and then the digit zero)
-fno-builtins    # do not use builtin function optimizations