wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

The Barcode scanner

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

1. True / False: Arrays allow a single variable name to store multiple values.

a)

True

b)

False

2.

The location of the data inside of an array is known as this.

a)

Index

b)

Boolean

c)

Return

d)

Parameter

3.

True / False: When naming an array, a data type does not have to be specified

a)

True

b)

False

4.

The size of an array is known as the number of this found in an array

a)

Parameters

b)

Elements

c)

Strings

d)

Numbers

5.

True / False: Trying to access an index larger than the array will generate an error.

a)

True

b)

False

6.

True / False: A Boolean variable is a variable that only stores a true or false value.

a)

True

b)

False

7.

What does the Global Variables window display when using the Boolean function?

a)

True

b)

False

c)

Zero

d)

One

8.

What is the binary code for T?

a)

00100

b)

00101

c)

01001

d)

01100

9.

What is the binary code for Z?

a)

10011

b)

01001

c)

00111

d)

01011

10.

What does int stands for?

a)

interval

b)

integrate

c)

integer

d)

initiate

11.

What is also known as the number of iterations?

a)

The number of times words are rhyming

b)

The number of errors

c)

The number of times a loop runs

d)

The number of functions

12.

What 3 parts in a 'for' loop must be specified?

a)

The denominator, the function and the multiplier

b)

The "for" function, the parameters and the semi-colon

c)

The initialization, qualifier and multiplier

d)

The initialization, the test condition and the increment

13.

Explain the initialization statement

a)

The initialization statement is where the variable that will be used to count the number of iterations through the loop is specified and set to its initial value

b)

The initialization statement is where the iteration that will be used to count the number of steps through the loop is specified and set to its integer value

c)

The initialization statement is where the function that will be used to count the number of iterations through the loop is specified and set to its increment value

d)

The initialization statement is where the increment that will be used to count the number of iterations through the loop is specified and set to its initial value

14.

What does the test condition specify?

a)

How to increase the increment

b)

How many iterations to loop through

c)

How to start the function

d)

Whether it is true or false

15.

What does the increment do?

a)

The increment increases the counter variable "i" after each iteration of the loop

b)

The increment decreases the counter variable "i" after each iteration of the loop

c)

The increment changes the "i" after each iteration of the loop

d)

The increment modifies the counter variable "i" after each iteration of the loop

16.

What is the meaning of i++?

a)

Decreasing by one

b)

Adding 1 to the current value of the variable "i"

c)

Add and add again

d)

Adding the values of the variables

17.

When “i” is equal to zero, it means that the line segment is ____

a)

white

b)

black

c)

dark

d)

light

18.

When “i” is equal to one, it means that the line segment is ____

a)

dark

b)

black

c)

white

d)

light

19.

What is step 2 of the 'for' loop?

a)

Check the test condition of the "for" loop. If the test condition is

true, enter the "for" loop. If the test condition is false, skip the "for" loop and run the rest of the program

b)

Check the test condition of the "for" loop.

c)

Check the test condition of the "for" loop. If the test condition is

true, enter the "for" loop.

d)

Check the test condition of the "for" loop. If the test condition is

false, enter the "for" loop. If the test condition is true, skip the "for" loop and run the rest of the program

20.

Is there a semi-colon after int binaryConvert( )?

a)

yes

b)

no