You are on page 1of 1

CSNB244 Programming II with C++

Semester 1, 2014-15
Quiz 2
(Do this quiz in a group of two persons)
Due date: 14
th
July 2014

1. Assume the following array is filled.

int Numbers [3][5] = { 1, 2, 3, 4, 5; 6, 7, 8, 9, 10; 11, 12, 13, 14, 15}

Write the necessary codes to print the values stored in the array backwards and all in one line.
Sample Output:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

[10 marks]





2. Define a structure that would store the following data for each inventory. The name of the item,
its price, balance in stock and date purchase. Decide on your own what would be the best data
type and identifiers to represent the data.

[3 marks]



3. Declare an array of 200 inventory items of the structure that you have defined in question 2.
[2 marks]

You might also like