Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Representation and File Organisation Quiz

Total questions: 91

Worksheet time: 47mins

Name
Class
Date
1.

Which of the following is a user-defined data type?

a)

Integer

b)

Float

c)

Record

d)

Boolean

2.

What is the main purpose of hashing algorithms in data representation?

a)

To sort data alphabetically

b)

To compress data for storage

c)

To map data to unique values for efficient access

d)

To convert data into binary format

3.

Which data type is most appropriate for storing a student's mark?

a)

String

b)

Integer

c)

Boolean

d)

Date

4.

Which method of file organisation allows for data to be accessed in the order it was stored?

a)

Random access

b)

Sequential access

c)

Direct access

d)

Hashing

5.

Why is the normalisation of binary floating-point numbers important?

a)

It increases the speed of data transmission

b)

It ensures consistent representation and accuracy

c)

It compresses the data for storage

d)

It converts binary numbers to denary numbers

6.

What is a non-composite data type?

a)

A data type that does not reference any other data types.

b)

A data type that is made up of multiple other data types.

c)

A data type that only stores text.

d)

A data type that is always a pointer.

7.

Which of the following is true about enumerated data types?

a)

They contain no references to other data types when defined.

b)

They always store floating-point numbers.

c)

They are only used for mathematical operations.

d)

They must be enclosed in quotation marks.

8.

In pseudocode, how is an enumerated data type for months typically defined?

a)

TYPE Tmonth = (January, February, March, April, May, June, July, August, September, October, November, December)

b)

TYPE Month = "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"

c)

TYPE Months = [January, February, March, April, May, June, July, August, September, October, November, December]

d)

TYPE Tmonth = {January, February, March, April, May, June, July, August, September, October, November, December}

9.

What is the purpose of using enumerated data types in programming?

a)

To define a list of all possible values for a variable.

b)

To store large amounts of data efficiently.

c)

To perform complex mathematical calculations.

d)

To reference memory addresses directly.

10.

Given the pseudocode: DECLARE thisMonth : Tmonth DECLARE nextMonth : Tmonth thisMonth ← January nextMonth ← thisMonth + 1 What will be the value of nextMonth?

a)

February

b)

January

c)

March

d)

December

11.

Why are the values in an enumerated data type not enclosed in quotation marks?

a)

Because they are not strings.

b)

Because they are always numbers.

c)

Because quotation marks are only used for comments.

d)

Because they are pointers.

12.

How would you declare an enumerated data type for the days of the week in pseudocode?

a)

TYPE Tday = (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)

b)

TYPE Weekday = "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"

c)

TYPE Days = [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]

d)

TYPE Tday = {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}

13.

If you assign the value of Wednesday to the variable today in an enumerated data type for days of the week, what would be a suitable assignment statement for tomorrow?

a)

tomorrow ← today + 1

b)

tomorrow ← today - 1

c)

tomorrow ← today * 2

d)

tomorrow ← today / 2

14.

Which key term refers to a non-composite data type that uses the memory address of where the data is stored?

a)

Pointer data type

b)

Set

c)

Enumerated data type

d)

User-defined data type

15.

What is the main difference between a set and an enumerated data type?

a)

A set is an unordered list that can use set theory operations, while an enumerated data type is a list of all possible values for a variable.

b)

A set only contains numbers, while an enumerated data type contains strings.

c)

A set is always composite, while an enumerated data type is always primitive.

d)

A set is used for memory addresses, while an enumerated data type is used for months.

16.

Which of the following best describes a pointer data type?

a)

A data type used to reference a memory location.

b)

A data type used to store only integer values.

c)

A data type that cannot be used in pseudocode.

d)

A data type that stores only user-defined types.

17.

In pseudocode, how is a pointer type definition typically represented?

a)

TYPE <pointer>=<Typename><pointer> = ^<Typename>

b)

TYPE = *

c)

TYPE = &

d)

TYPE = #

18.

What does the symbol '^' indicate in the pointer type definition in pseudocode?

a)

The type is an array.

b)

The type is a pointer.

c)

The type is a constant.

d)

The type is a function.

19.

Given the pseudocode: TYPETmonthPointer=TmonthTYPE TmonthPointer = ^Tmonth , what does Tmonth represent?

a)

The pointer variable name.

b)

The data type stored at the memory location.

c)

The address of the pointer.

d)

The value of the pointer.

20.

If you want to access the value stored at the address a pointer is pointing to, what operation must you perform?

a)

Initialization

b)

Dereferencing

c)

Declaration

d)

Assignment

21.

What is a composite data type?

a)

A data type that refers to any other data type in its type definition.

b)

A data type that stores only primitive values.

c)

A data type that cannot be used in records.

d)

A data type that is always an integer.

22.

(Activity 13B) Using pseudocode for the enumerated data type for days of the week, what must you do to declare a suitable pointer to use?

a)

Set up the pointer data type and the pointer variable.

b)

Only declare the pointer variable.

c)

Only set up the pointer data type.

d)

Use a composite data type instead.

23.

How can you set a pointer to point to a specific value, such as 'today', in pseudocode?

a)

Assign the pointer variable to the value.

b)

Assign the value to the pointer data type.

c)

Dereference the pointer variable.

d)

Use a composite data type.

24.

Which of the following is an example of a composite data type?

a)

Integer

b)

Set

c)

Boolean

d)

Character

25.

In pseudocode, how is a set data type typically defined?

a)

TYPE = SET OF

b)

DEFINE = LIST OF

c)

DECLARE : ARRAY OF

d)

SET = TYPE OF

26.

Which operation is commonly associated with set data types?

a)

Sorting

b)

Intersection

c)

Concatenation

d)

Division

27.

Why might a programmer choose to define a user-defined data type?

a)

To increase the speed of the program

b)

To represent complex data structures more efficiently

c)

To avoid using variables

d)

To reduce the number of functions in a program

28.

If you need to store data about each house that an estate agent has for sale, which data type would be most suitable?

a)

Class

b)

Boolean

c)

Integer

d)

Set

29.

For storing the addresses of integer data held in main memory, which data type would be most appropriate?

a)

Set

b)

Pointer

c)

Class

d)

String

30.

Strategically, how would you decide whether to use a set or a class for a given programming problem?

a)

Use a set if you need ordered elements; use a class for unordered elements

b)

Use a set for simple collections of unique items; use a class for complex objects with multiple attributes and methods

c)

Use a class only for mathematical operations; use a set for storing text

d)

Use a set for storing numbers; use a class for storing strings

31.

Which of the following best describes Serial file organisation?

a)

Records are stored in a file in any available position.

b)

Records are physically stored in a file, one after another, in the order they were added.

c)

Records are stored using a mathematical formula to calculate their position.

d)

Records are stored in a file without any specific order.

32.

What is the main purpose of a hashing algorithm in file access?

a)

To sort records alphabetically.

b)

To calculate the address where a record should be found.

c)

To append new records to the end of a file.

d)

To delete records from a file.

33.

Which file access method allows a record to be physically found in a file without searching through other records?

a)

Sequential access

b)

Direct access

c)

Serial file organisation

d)

Random file organisation

34.

In sequential access, how are records searched in a file?

a)

By using a hashing algorithm to jump directly to the record.

b)

By searching one after another from the physical start of the file until the required record is found.

c)

By searching in random order.

d)

By searching only the last record added.

35.

Why is serial file organisation often used for temporary files storing transactions?

a)

Because it allows records to be stored in any available position.

b)

Because it stores records in chronological order as they arrive.

c)

Because it uses a mathematical formula to find records.

d)

Because it allows direct access to any record.

36.

A company stores customer meter readings in a file using serial file organisation. What is the advantage of this method for billing customers?

a)

It allows instant access to any customer's record.

b)

It ensures that records are stored in the order of arrival, making it easy to process transactions chronologically.

c)

It uses a hashing algorithm to find records quickly.

d)

It stores records in random positions for faster access.

37.

Which method physically stores records of data in a file one after another in a given order?

a)

Sequential file organisation

b)

Random file organisation

c)

Direct file organisation

d)

Indexed file organisation

38.

In sequential file organisation, what is typically used as the key field to uniquely identify each record?

a)

Customer name

b)

Customer address

c)

Customer number

d)

Customer phone number

39.

Which of the following best describes how new records are added in sequential file organisation?

a)

At any empty position in the file

b)

At the end of the file only

c)

In the correct place based on the key field order

d)

Randomly throughout the file

40.

If Customer 5 is added to a sequential file containing Customers 1, 2, 3, 4, 7, and 8, where will Customer 5's record be placed?

a)

At the end of the file

b)

Before Customer 1

c)

Between Customer 4 and Customer 7

d)

After Customer 8

41.

Which method physically stores records of data in a file in any available position?

a)

Sequential file organisation

b)

Random file organisation

c)

Direct file organisation

d)

Indexed file organisation

42.

What is used to determine the location of any record in a random file organisation?

a)

Sorting algorithm

b)

Hashing algorithm

c)

Searching algorithm

d)

Indexing algorithm

43.

In random file organisation, where can new records be added?

a)

Only at the end of the file

b)

Only at the beginning of the file

c)

At any empty position

d)

Only in alphabetical order

44.

Which of the following is NOT a method of file access mentioned in the text?

a)

Sequential access

b)

Direct access

c)

Indexed access

d)

File access

45.

What does the sequential access method do when searching for a record in a file?

a)

Searches records in random order

b)

Searches records one after another from the physical start of the file

c)

Uses a hashing algorithm to find the record

d)

Searches only the last record

46.

For a serial file, what happens if a particular record is being searched for and is not found after searching the whole file?

a)

The search stops and no new records are added

b)

The search continues in reverse order

c)

New records are appended to the end of the file

d)

The file is deleted

47.

For a sequential file, when searching for a particular record, when does the search stop?

a)

When the record is found or the key field of the current record is greater than the key field of the record being searched

b)

When the record is found or the end of the file is reached

c)

When the record is found or the file is sorted

d)

When the record is found or the file is deleted

48.

Which type of file access is most efficient when every record in the file needs to be processed, such as in a monthly billing system?

a)

Sequential access

b)

Direct access

c)

Random access

d)

Hashing algorithm

49.

What is the main advantage of direct access over sequential access when updating a single record in a file?

a)

Direct access is slower than sequential access

b)

Direct access allows specific records to be found more quickly

c)

Direct access requires searching the whole file

d)

Direct access is only used for encrypted data

50.

Which method uses a mathematical formula to calculate the address where a record should be stored in a file?

a)

Sequential access

b)

Direct access

c)

Hashing algorithm

d)

Indexing

51.

If a file has space for 2000 records and the key field value is 3024, what would be the address to store the record using the hashing algorithm described?

a)

3024

b)

1024

c)

0

d)

2000

52.

Explain why a hashing algorithm might be preferred over sequential access for storing and retrieving records in a large file. Use evidence from the text to support your answer.

a)

Hashing algorithms are slower and less efficient than sequential access

b)

Hashing algorithms allow direct calculation of record addresses, reducing search time

c)

Hashing algorithms require searching the whole file

d)

Hashing algorithms are only used for encrypted data

53.

Which of the following best describes a collision in hashing algorithms for direct access to records in a file?

a)

When two records have the same key field

b)

When two records try to use the same file location

c)

When a record cannot be found in the file

d)

When the hashing algorithm fails to generate an address

54.

What is the main difference between an open hash and a closed hash in file organisation?

a)

Open hash stores records in the next free space, closed hash uses an overflow area

b)

Open hash uses an overflow area, closed hash stores records in the next free space

c)

Open hash is used for sequential files, closed hash for serial files

d)

Open hash does not use hashing algorithms, closed hash does

55.

When reading a record from a file using direct access and hashing, what must be checked before using the record?

a)

The file type

b)

The size of the record

c)

The key field against the original key field

d)

The number of records in the file

56.

Explain, using examples, the difference between serial and sequential files.

a)

Serial files store records in order of key field, sequential files store records randomly

b)

Serial files store records randomly, sequential files store records in order of key field

c)

Both store records in order of key field

d)

Both store records randomly

57.

If a file of records is stored at address 500 and each record takes up five locations, what is the address to store the record with key field 9354 using the hashing algorithm described?

a)

9354

b)

9354 divided by 1000 plus 500

c)

9354 mod 1000 plus 500

d)

9354 mod 1000 plus 500 plus (size of record)

58.

If the location calculated for storing a record has already been used and an open hash is used, what is the address of the next location to be checked?

a)

The previous location

b)

The next free space in the file

c)

The overflow area

d)

The start address of the file

59.

Choose an appropriate file type for recording daily rainfall readings at a remote weather station to be collected every month. Give the reason for your choice.

a)

Serial file, because records are stored randomly

b)

Sequential file, because records are stored in order of key field

c)

Sequential file, because data is collected regularly and needs to be accessed in order

d)

Serial file, because data is collected irregularly

60.

A hashing algorithm adds up the ASCII values for every character in a name, divides by the number of locations in the file, and uses the remainder as the basis for the address. What is the purpose of multiplying this value by 20 and adding it to 2000 in the extension activity?

a)

To increase the randomness of the address

b)

To ensure the address is within a specific range

c)

To make the calculation more complex

d)

To avoid collisions entirely

61.

Which of the following denary numbers, when converted to binary, would require the use of two's complement representation?

a)

+48

b)

+122

c)

-100

d)

123000000

62.

What is the binary equivalent of the denary number 122?

a)

01111010

b)

01111110

c)

10111010

d)

11111111

63.

Convert the binary number 00110011 to denary.

a)

51

b)

27

c)

19

d)

35

64.

Which binary number represents the denary value 255?

a)

11111111

b)

10101010

c)

11001100

d)

10000000

65.

Using two’s complement, what is the negative value of the binary number 00011001?

a)

11100111

b)

11100110

c)

11100101

d)

11100100

66.

What is the result of adding the binary numbers 00110001 and 00011110?

a)

01001111

b)

01001010

c)

01010101

d)

01011000

67.

Express 123,000,000 in standard form.

a)

1.23×1081.23 \times 10^8

b)

1.23 × 10^7

c)

12.3×10612.3 \times 10^6

d)

123×105123 \times 10^5

68.

Which of the following is the correct standard form for 2,505,000,000,000,000?

a)

2.505×10152.505 \times 10^{15}

b)

25.05×101425.05 \times 10^{14}

c)

250.5×1013250.5 \times 10^{13}

d)

2505×10122505 \times 10^{12}

69.

In standard form, how can the improper fraction 14/5 be written?

a)

1.4×1011.4 \times 10^1

b)

2.8×1012.8 \times 10^1

c)

14×10514 \times 10^5

d)

2.8×1052.8 \times 10^5

70.

When converting improper binary fractions, what is the value of 7/8 in binary using powers of 2?

a)

7×2−37 \times 2^{-3}

b)

7×237 \times 2^3

c)

8×2−78 \times 2^{-7}

d)

8×278 \times 2^7

71.

Given the binary fraction 11/2, how can it be written using powers of 2?

a)

11×2−111 \times 2^{-1}

b)

2×2−112 \times 2^{-11}

c)

1×2−111 \times 2^{-11}

d)

2×2112 \times 2^{11}

72.

If you are asked to convert the binary number 11111110 to denary, which skill or concept are you applying?

a)

Recall

b)

Application of binary to denary conversion

c)

Strategic reasoning

d)

Standard form conversion

73.

Why is two’s complement used in binary arithmetic?

a)

To represent positive numbers only

b)

To represent negative numbers in binary

c)

To convert binary to denary

d)

To add binary numbers

74.

A student is given the binary addition problem: 11111110 + 01111110. What is the first step they should take to solve it?

a)

Align the numbers and add each bit starting from the rightmost bit

b)

Convert both numbers to denary first

c)

Subtract the smaller number from the larger

d)

Write the numbers in standard form

75.

When converting improper binary fractions into proper binary fractions, which mathematical concept is primarily used?

a)

Powers of 2

b)

Powers of 10

c)

Decimal places

d)

Two’s complement

76.

Which term refers to the fractional part of a floating point number?

a)

Mantissa

b)

Exponent

c)

Overflow

d)

Underflow

77.

What is the result called when a calculation produces a value too large for the computer’s allocated word size?

a)

Overflow

b)

Underflow

c)

Mantissa

d)

Exponent

78.

What is the binary floating-point number written in the form of?

a)

M × 2ᴱ

b)

M + E

c)

M ÷ E

d)

M × E

79.

Which method is used to improve the precision of binary floating-point numbers?

a)

Normalisation (floating-point)

b)

Exponentiation

c)

Rounding

d)

Truncation

80.

What does the exponent represent in a floating-point number?

a)

The power of 2 that the mantissa is raised to

b)

The fractional part of the number

c)

The total number of bits used

d)

The sign of the number

81.

Why does fixed-point representation limit the range of numbers and not allow for fractional values?

a)

Because the number of bits is fixed and does not allow for fractions

b)

Because it uses floating-point representation

c)

Because it uses scientific notation

d)

Because it allows for unlimited range

82.

If a computer uses 8 bits for the mantissa and 8 bits for the exponent, what is assumed about the binary point in the mantissa?

a)

It exists between the first and second bits

b)

It is always at the end

c)

It is always at the beginning

d)

It does not exist

83.

What is the result called when a calculation produces a value too small for the computer’s allocated word size?

a)

Underflow

b)

Overflow

c)

Mantissa

d)

Exponent

84.

Which part of the scientific notation 3.1211 × 10²³ is the mantissa?

a)

3.1211

b)

10

c)

23

d)

2

85.

How does using binary floating-point representation increase the range and allow for fractions compared to fixed-point representation?

a)

By using separate bits for mantissa and exponent

b)

By using only the exponent

c)

By using only the mantissa

d)

By ignoring fractional values

86.

Which of the following is the correct denary value for the binary floating-point number with mantissa 0.1011010 and exponent 4?

a)

11.25

b)

10.5

c)

12.75

d)

9.25

87.

What is the value of the mantissa when the bits 0.1011010 are used, considering only the positions where the bit is 1?

a)

45/64

b)

32/64

c)

23/64

d)

64/64

88.

If the exponent is 4, how many places should the binary point be moved to the right in the mantissa according to Method 2?

a)

4 places

b)

2 places

c)

8 places

d)

1 place

89.

Given the mantissa bits 0 1 0 1 1 0 1 0, which fractional values should be added to calculate the mantissa value?

a)

1/2, 1/8, 1/16, 1/64, 1/128

b)

1/2, 1/8, 1/16, 1/64

c)

1/2, 1/8, 1/64, 1/4, 1/32

d)

1/2, 1/4, 1/8, 1/16, 1/32

90.

If you are given a binary floating-point number with mantissa 0.0101000 and exponent 3, what is the first step to convert it to denary using Method 2?

a)

Write the mantissa as 0.0101000 and move the binary point three places to the right

b)

Add all the mantissa bits together

c)

Multiply the mantissa by 2^3

d)

Subtract the exponent from the mantissa

91.

What is the value of the mantissa (M) when the bits with value 1 are at positions corresponding to 1/4, 1/16, and 1/16?

a)

5/16

b)

1/4

c)

1/2

d)

3/16