September Assessment Flashcards
Describe how Interpreter software enables a program written in a HLL
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.
Describe the principles of operation of a barcode
- 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
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
- 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.
Explain how a single stack can be used to reverse the order of the items in a queue.
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.