wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Implementation - PowerPoint 1 Higher

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.

What are variables used for in programming?

a)

To identify storage locations in memory

b)

To increase the processing speed of the CPU

c)

To connect to the internet

d)

To create graphical user interfaces

2.

What type of variable can be accessed by any procedure/function in the program at any time?

a)

Local variable

b)

Constant variable

c)

Static variable

d)

Global variable

3.

Where can a local variable be accessed?

a)

Anywhere in the program

b)

Only inside the procedure/function it is declared in

c)

Only outside the procedure/function it is declared in

d)

Inside any procedure/function regardless of where it is declared

4.

Can a local variable be accessed by any other sub-program unless they are passed as a parameter or returned from a function?

a)

Yes, always

b)

No, never

c)

Yes, but only if they are global

d)

No, unless they are passed as a parameter or returned from a function

5.

What is assignment in the context of programming?

a)

The process of comparing two values

b)

The process of assigning a value to a variable

c)

The process of performing arithmetic operations

d)

The process of printing a value to the screen

6.

What do 1-D arrays allow programmers to do?

a)

Store a single piece of data

b)

Store multiple pieces of data of different data types

c)

Store multiple pieces of data of the same data type

d)

Execute complex algorithms

7.

How would you declare an array to store 30 pupil scores using zero-based indexing?

a)

Dim pupilScore(30) As Integer

b)

Dim pupilScore(29) As Integer

c)

Dim pupilScore(28) As Integer

d)

Dim pupilScore(31) As Integer

8.

How do you declare an empty array of strings in the given language?

a)

DECLARE cities AS STRING INITIALLY [ ]

b)

DECLARE cities AS STRING [ ]

c)

DECLARE cities AS ARRAY [ ]

d)

DECLARE cities AS STRING INITIALLY { }

9.

What are parallel arrays?

a)

Arrays that are used to sort information.

b)

Arrays that are used in conjunction with each other to display information together.

c)

Arrays that contain identical elements.

d)

Arrays that are used to store information independently.

10.

What are records in programming?

a)

Predefined data types provided by the programming language

b)

Programmer defined data types

c)

Functions that return multiple values

d)

A type of loop structure

11.

How can you hold multiple data types inside an array?

a)

By creating a multidimensional array

b)

By defining an array with a generic type

c)

By creating a record type, which then allows the creation of an array of records

d)

By using a union data type

12.

What is the correct syntax to declare a structure named petData in VB?

a)

Structure petData { name As String, type As String, ownerName As String, tagID As Integer }

b)

Structure petData Public name As String Public type As String Public ownerName As String Public tagID As Integer End Structure

c)

Structure petData Public name As String Public type As String Public ownerName As String Public tagID As Integer End Structure

d)

RECORD petData IS { STRING name, STRING type, STRING ownerName, INTEGER tagID }

13.

In the Reference Language, how are the data types of the fields 'name', 'type', and 'ownerName' declared?

a)

INTEGER

b)

STRING

c)

Structure

d)

Public

14.

How do you declare an array of records in VB for storing pet data?

a)

Dim pets As petData[3]

b)

Dim pets(3) As petData

c)

Dim [3]pets As petData

d)

Dim petData pets(3)