Quiz
GAME 1001 Chapter 8
This quiz has a time limit, so it opens in the usual player.
Questions in this quiz (15)
1An array is:
- AA - has a subscript
- BB - a variable that can store multiple values of the same type
- CC - declared using ( ) operator
- DA and B are correct
- EB and C are correct
- FA, B, and C are correct
2Each array [blank_start]element[blank_end] has a [blank_start]subscript[blank_end] used to access the element. Subscripts start at [blank_start]0[blank_end].
- Aelement
- Bprototype
- Csubscript
- Drefrence
- Eparameter
- F0
- G1
- H10
3int tests[ISIZE];
ISIZE = ___?- Athe size declarator
- Bthe name of the array
- Cthe data type of the array elements
- DNone of the above
- EAll of the above
4cout and cin can be used to display values from and store values into an array
- ATrue
- BFalse
5Which of the following can be used to access each element of an array?
- AUse a loop
- BUse a control variable
- CUse a subscript
- DIncrement the array index using ++ or --
- EAll of the above
- FNone of the above
6Which of the following is false about arrays?
- Athere are no checks in an array that a subscript is in range
- Ban invalid subscript can cause the program to overwrite other memory
- Can array can be initialized during the program
- DC++ can't determine the size of an initialization list
- EAll are correct
7What does a range based for loop do?
- Aa loop that simplifies array processing
- Bit uses a variable that will hold a different array
- Cdo not have to set the array initialization list
- DAll of the above
- ENone of the above
8Which of the following statements is false (Refer to the comments "//")
- Aarrays can be treated as ordinary variables
- Bused in arithmetic expressions
- Ctests[i] //++ adds 1 to the tests[i]
- Dtests[i++] //Will not work
- EAll of the above are correct
9What is a parallel Array?
- Atwo or more arrays that contain related data
- Ba variable that can store multiple data types
- Cno checks in c++ that indicate its there
- DNone of the above
- EAll of the above
10What is this an example of?
-> typedef existingType newName- Aa typeindef statement used to make code more reliable
- Ba typeindef statement used to make a variable also accepted by a different data type
- Cpasses an array to a function
- Darray parameters
11int exams[4][3];
[4] is known as the [blank_start]row[blank_end]- Arow
- Bcolumn
- Csubscript
- Dexams
- Einteger
12int exams[4][3];
[3] is an example of a [blank_start]column[blank_end]- Acolumn
- Brow
- Csubscript
- Dinteger
- Ea number
13What is this an example of?
int exams[4][3];- Aan array
- Ba two dimensional array
- Cthis will not work
- Da variable
14What does a vector do?
- Ait can hold values of any data type
- Bmust include the standard template library
- Cneed #include <vectors>
- Dvector<int>scores(24); //Initialized at the start
- EAll of the above
- FNone of the above
15A push_back adds an element to a full vector, while a pop_back removes the last element from the vector
- ATrue
- BFalse
Information
- Description
- Intro to Programming - GAME1001 Quiz on GAME 1001 Chapter 8, created by Liam Blake on 28/11/2018.
- Author
- Liam Blake
- Language
- English
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz