September Assessment Flashcards

1
Q

Describe how Interpreter software enables a program written in a HLL

A

The interpreter software is resident in memory at the same time , it converts each instruction/statement one line at a time and check the program to see if the line is error free and if it is it executes it.

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

Describe the principles of operation of a barcode

A
  • Light source/laser is shone at the barcode, moving mirror moves it across the barcode
    -light is reflected back
    -the black and white bands reflect different amounts of light
    a light sensor measure the amount of reflected light which is measured and converted into a binary signal
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the method that would be followed to attempt to remove an item from a circular queue implemented as a static data structure using an array

A
  • First check if the queue is not empty
  • Then output the item the item referenced by the front pointer
  • Then add one to the front pointer
  • Then check if the front pointer is within the maximum size of the array , if they are equal then add one so it is equal to 0.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain how a single stack can be used to reverse the order of the items in a queue.

A

Repeatedly remove the front item from the queue and push it onto the stack, then using the stack , you repeatably pop the items from the top of the stack and put it into the rear of the queue.

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