Lab 1 - Getting Started
Due - September 13/14, 2004
In this lab, you will compile and run your first program in C.
Create a new project using Microsoft Visual C++. The worksheet provided in lab will guide you through this process. Now, create a new C/C++ source file and type the following program into your source file. Compile and run the program.
* Description: My first "hello, world" program in C.
//the main function
int main (void)
//print the phrase
- Make sure a lab assistant (Dianne or I) has seen your program run.
- Modify your program so that it prints your name instead of the default message.
- Again, demonstrate, to a lab assistant, that your program runs.
- Copy and paste the output of your program to the bottom of your program itself. Make sure the output is a comment. That means, put a /* before the output and a */ after the output.
- Take some time to introduce errors into your program and see what happens. For example, remove the semicolon from the end of the "printf" line. Try to compile your program. What happens? Replace the semicolon and remove a curly-brace. What happens?