Preview

08 - Final Test

 1. An interpreter does not create an independent final set of source code - source code is created each time it runs.

  FALSE

  TRUE

 2. Interpreted languages include JavaScript, PHP, Python and Ruby. Interpreted languages are also called scripting languages.

  TRUE

  FALSE

 3. Java and C++ are compiled languages. Java is a high-level language which is compiled to produce bytecode which is then interpreted by a virtual machine (VM).

  TRUE

  FALSE

 4. Bytecode is code ….

  which is measured in bytes

   which is compiled and can then be interpreted.

  None of these answers apply

  which is bytesize in that it is always 8 bits long

 5. Libraries. These provide functions that are not included in the core part of the programming language and are IDE tools

  FALSE

  TRUE

 6. Name one example of a high level language

  Machine Code

  Assembly Language

  Python

  Binary

 7. What is meant by the term 'machine code'?

  Made up of opcode and operand

  All of the above

  Code in a format that the CPU can process

  Binary representation of instructions

 8. Maintaining a program is easier with High Level as opposed to Low Level languages

  FALSE

  TRUE

 9. Low level languages are closer to natural English

  FALSE

  TRUE

 10. What is one difference between machine code and assembly language?

  There is no difference

  Machine code is binary / assembly language uses text. Machine code can be directly processed / assembly language must be translated/

  Machine code has simple letters where as Assembly language has 1s and 0s

  None of these apply

 11. A compiler produces a machine code file but an interpreter does not

  TRUE

  FALSE

 12. What on the following list is a useful feature of an IDE?
•	Built in translator
•	Syntax highlighting / colour coding
•	Code completion
•	Automatic indentation
•	Automatic documentation
•	Error checking
•	Online help

  None of the items on the list are valid

  Syntax highlighting and Automatic documentation

  Error checking and Online help

  All of the items on the list are valid useful features of an IDE

 13. Both machine code and assembly language are machine specific

  FALSE

  TRUE

 14. Sometimes an IDE will suggest variable / function names while typing. What is this called?

  helpful injunction

  code completion

  variable induction

  marrying IDE

 15. Compiled code can be executed again without being re-translated … interpreted code needs to be translated each time it is run.

  TRUE

  FALSE

 16. Compiled machine code keeps the source code secret … interpreted programs mean that the source code is visible.

  TRUE

  FALSE

 17. Which language translator is used for low level languages?

  Compiler

  Assembler

  Interpreter

  Translatexutor

 18. Assembly language is made up of predetermined set of commands that can be understood by a human such as:

  xOR/One

  101010101

  ADD

  print(Now)xx001

 19. Each command 'word' translates ….

  indirectly into programming code

  directly into python code

  directly into a machine code number

  directly into electricity signals

 20. Assembly language has a low level of abstraction and is very similar to machine code (e.g there is a direct link between the instruction and machine code it represents)
Note: If you're really interested at this stage, perhaps give this video a watch (and try it out yourself)

  FALSE

  TRUE

 21. The complete set of commands available is called the _________________

  instruction set of the CPU

  mindset of the computer

  assembly junk of the operating system

  Fond butterfly code

 22. The instructions within assembly language are called Mnuecats

  TRUE

  FALSE

 23. Programming in asssembly language is considered:

  the fastest approach to solving a problem that involves the internet

  still quite difficult as the programmer needs to know about the hardware in the CPU

  the best sort of programming in use for web development

  incredibly easy

 24. One disadvantage or issue with assembly language is that the code only works on a specific CPU family. If you use a different CPU you would

  None of the above

  need to re-write the code using a different version of assembly language

  need to make a copy of your old CPU

  not need to rewrite the code at all

 25. The main advantage of assembly language is that it :

  is robust and hardy and cannot ever make a mistake (hence it's popular use in spacecraft)

  runs slow compared to high level languages which makes it easy to follow

  runs fast compared to programs written in a high level language as there is less code overall

  is soft and cuddly, and therefore programmer's favourite

 26. What is NOT used to translate high level languages?

  Compiler

  None of these answers apply

  Assembler

  Interpreter

 27. Which translator stops when it encounters an error and goes line by line?

  Assembler

  Compiler

  None of these answers apply

  Interpreter

 28. What type of translator is used to translate assembly language

  Assembler

  None of these answers apply

  Interpreter

  Compiler

 29. When working with a high level language, ________ needs to be converted into machine code to run in a CPU

  embedded code

  firmware software

  machine code

  source code

 30. Two tools that are necessary for both writing and converting high level language code are:

  Translators and Binary

  Translators and ASCII

  Translators and Currency

  Translators and IDEs