CS210 Lab: Unsorted Lists Prelab

Prelab Questions:

The following are some questions that you can answer prior to the lab.
  1. Find the error in the following code segment:
    	int myarray[5];
    	// Loop to store 5 numbers in the array
    	for (int i=1; i<5; i++)

  2. Write a code segment to dynamically allocate an array (called myarray) of x integers.
  3. If the constructor for a class called Stash was defined as the following:
    	Stash ( int size, int quantity = 0 );
    which of these two object definitions would be incorrect:
    	Stash A(100);
    	Stash B(100,0);

For Answers, click here
Back to Unsorted Lists Lab click here

CS Dept Home Page
CS Dept Class Files
CS210 Class Files

Copyright: Department of Computer Science, University of Regina.