New Exam Revision Flashcards

0
Q

A parameter is:

A

A placeholder for data passed to a sub-routine or function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Machine code is:

A

The output of the compiler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The scope of a private sub is:

A

The sub routine can only be used by this form (or class)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A group of objects or variables all having the same name are:

A

An array.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The symbol “=” means.

A

Is identical to or takes value of.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

On a form of entering students grades which control type should be used to get the students name.

A

Text box.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

On a form for entering personal preferences, which control type type should be used to indicate favourite foods.

A

Check box

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which control type should be used to select the gender of an individual.

A

List box

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The properties of a control do bit determine the controls movements:

A

Movement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When writing the command public sub means that

A

This subroutine is available to forms and classes Ina program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the difference between the Text and Name properties of a control?

A

Text is what you write in the box that will show up when the program runs. Name is the name of the control that shows up in the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What would you name a textbox that was used to enter a person’s name?

A

txt.Name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is special about declaring a variable with Static?

A

Eg. Static iCounter as Integer = 0

It retains the variable in the code for subsequent calls to the sub-routine or function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the scope of a variable refer to?

A

It reefers to where the variable can be used or seen by the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How would you declare a variable such as PI in a program and how does this differ from other variables?

A

Declare as a constant and can only be changed in the declaration statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Explain what a function is.

A

A piece of code in a program that when called performs an operation and returns a value to the calling code.

16
Q
  1. What sort of loop would you use to execute a section of code a set number of times?
A

For i as Integer = 1 to 10

Next

17
Q

What sort of loop would you use to execute a section of code at least once?

A

Do until

18
Q
  1. What sort of loop would you use to execute a section of code zero or more times?
A

While tank is not fuel add one litre

End while

19
Q

Write the code to declare an integer variable with an initial value of 15 and describe what each word or value in the declaration means.

A

Dim iNumber as Integer = 15

Dim: keyword for declaration

iNumber: a meaningful name with datatype prefix

20
Q

Local variable

A

When declared in a program this variable can only be seen and used within the sub routine or function where it is declared

21
Q

Form level

A

When declared in a program this variable can be seen by all sub routines and functions in the program.

22
Q

Source code

A

The code written by the programmer using a programming language.