Lab 3 - Debugging and Visual C++

Lab 3 - Debugging and Visual C++ - CSCI 101: Fundamentals...

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

View Full Document Right Arrow Icon
CSCI 101: Fundamentals of Computer Programming Lab 3: Debugging / Microsoft Visual C++ Fall 2007 Debugging A major portion of the time spent on programming is often in debugging. This is especially true when the length of the program and its complexity increases. Therefore, we are to dedicate a portion of this lab to debug a faulty program. Create a file and name is as “lab3debugging.cpp”. Type or copy/paste the following into that file using emacs. /* Name: Student ID: File: lab3debugging.cpp Lab Section: ***** Lab Assistant: Date: Description: Debugging */ /* Comment on program algorithm and design */ /* Header file */ //#include <iostream> //#include <string> using namespace std; /* Main Program */ int main(){ /* Local definitions */ int num1 = 2, num2 = 3; char word[10] = "word"; /* Errors with cout */ cout << "\n1. This is a simple cout statement.\n"; //cout << \n2. This is a simple cout statement with errors.\n;
Background image of page 1

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

View Full DocumentRight Arrow Icon
//cout << "\n3. This is also another erroneous cout statement."\n; //cout << "\n4. This is a cout statement with a very common mistake\n" //cout << "\n5. This is a cout statement with an integer number: num1 = ", num1; //cout << "\n6. This is also a cout statement with an integer number: num1 = " << num1 "\n"; //cout << "\n7. This is a cout statement with two integers: num1, num2 = " << num1,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/13/2008 for the course CSCI 101L taught by Professor Ghyam during the Fall '07 term at USC.

Page1 / 8

Lab 3 - Debugging and Visual C++ - CSCI 101: Fundamentals...

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

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