wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Year 12 Programming

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Which data type consists of a series of character data types?

a)

floating point

b)

linked list

c)

integer

d)

string

2.

What is the result of the operation 10 % 3?

a)

0.30

b)

0

c)

1

d)

3.33

3.

What is the result of the operation 8 <= 3

a)

8

b)

3

c)

True

d)

False

4.

Peter accesses a data structure in pseudocode in the following way:

CustomerDetails.name = "John"

Which data structure has he used

a)

Queue

b)

Record

c)

Stack

d)

Array

5.

Samanatha is using a data structure that stores a collection of related information. The information contained within the collection have different data types. This data structure is most likely:

a)

a record

b)

an array

c)

a dictionary

d)

a hash table

6.

Christine performs the following action using a data structure:

fullPlaylist.enqueue("My Sunshine.mp3")

What data structure is fullPlaylist?

What data structure is

a)

a linked list

b)

a queue

c)

a stack

d)

a record

7.

A data structure that consists of (key, value) pairs where each key is unique is referred to as a/an

a)

array

b)

linked list

c)

floating point

d)

associative array

8.

A hash table in a software system uses a perfect hash function. This means that the hash function:

a)

works on all whole numbers

b)

does not error on any input

c)

creates a hash table with only one element in each slot

d)

creates a hash table with an even number of elements in each slot

9.

Rohit is writing a sorting algorithm and needs to use a data structure that can store an ordered set of elements. Each element must be connected to the next element in the list as well as to the previous element, if there is one. Which data type or structure should Rohit choose?

a)

an associate array

b)

a linked list

c)

a class

d)

a field

10.

Eva is writing a code to handle users, and wants to use inheritance to create a special type of user that has different access to normal users. The most appropriate data structure Eva should use is

a)

field

b)

class

c)

object

d)

record

11.

The data dictionary above has been created for a financial application for banks around Australia.

What data type is most suitable for the variable ‘postcode’?

a)

string

b)

integer

c)

boolean

d)

floating point

12.

What result will pseudocode returnResult produce given the above input?

a)

fullStack: { “carrot”, “date”, “eggplant”, “fig” }

b)

fullStack: { “apple”, “banana”, “carrot”, “fig” }

c)

fullStack: { “fig”, “banana”, “carrot”, “date” }

d)

fullStack: { “carrot”, “date”, “eggplant”, “fig” }

13.

Internal documentation should be meaningful and provide important information about code because:

a)

it will help the compiler read the code faster when compiling the software

b)

it reduces the amount of effort a programmer needs to put into creating code

c)

it makes it easier to understand code in the future

d)

it makes the code more efficient and effective

14.

Which naming convention has been used in the following pseudocode?

a)

Hungarian

b)

Camel Case

c)

Snake Cake

d)

Pascal

15.

The variable named MAXIMUM_OVERDRIVE follows what naming convention?

a)

Hungarian

b)

Speeding Train

c)

Screaming

d)

Screaming Snake Case