Lab 2
The purpose of this lab is to help you understand sytax errors.
When you finish this lab you should:
- Leared the conditions that cause a number of syntax errors.
Please do the following:
- make a copy of lab1.C
- At the command line type:
cp lab1.C lab2.C
- Do all of your work on lab2.C
- Systematically introduce a number of syntax errors into your program,
compile it and see what it produces.
- Keep alist of the error you introduced and the error that the
compiler reported. Keep
- The code that caused the error.
- Your description of the error.
- The compiler report of the error.
- Any Comments on what happened.
- When you have found at least 5 different types of errors, mail
the list to dbennett@edinboro.edu. Make sure you name, and lab2 are included in this message.
- Some things to try.
- Delete an # in an #include statement
- Mispell a reserved word
- Delete a ;
- Remove a "
- Mispell main
- Cutting and pasting in UNIX
- Unix has a single cut buffer that holds text.
- To put into the text buffer
- Highlight a section of text by moving the cursor to the
beginning of the text
- Press and hold the left mouse button
- move to the end of text you want to highlight
- Release the mouse button.
- To paste
- Move to where you want to paste the text
- Press the middle mouse button.
- If you have a two button mouse, press both buttons at once.