Menu

2.5 Programming Languages & IDEs

Card 1 of 34 0 got it 0 still learning
Question
TapClick or press space to see the answer
Answer
All 34 cards in this set
Which pair are both low-level programming languages?
Machine code and assembly language
Why must a program written in a high-level language be translated before it can run?
A CPU can only execute machine code
Which statement describes what a compiler does?
It translates the whole source code into machine code before the program runs
Which statement describes what an interpreter does?
It translates and runs one line at a time, stopping at an error
A software company is ready to sell a finished game and does not want to give customers the source code. Which translator should it use?
A compiler, because it produces a standalone executable file
A programmer is writing a new program and wants to test each change straight away. Which translator is best?
An interpreter, because each line is translated and run as it is reached
Assembly language uses short words such as ADD instead of binary codes. Which statement about assembly language is correct?
Each instruction matches one machine code instruction
A device driver must control hardware directly and run as fast as possible. Why is a low-level language a suitable choice?
It gives direct control over the hardware and runs very quickly
Which is an advantage of writing a program in a high-level language rather than a low-level language?
The program is easier to read, write and debug
Which is a drawback of using a compiler?
The program must be recompiled after every change
Why can a program written in a high-level language be run on several different types of computer, while a program written in a low-level language cannot?
The source code can be translated separately for each type of processor
A program runs more slowly when it is executed by an interpreter than when the same program has been compiled. Why?
Every line is translated again each time the program is run
A programmer writes a single statement in a high-level language that adds up a list of numbers. What happens to this statement when the program is translated?
It becomes many machine code instructions
A programmer compiles a program that contains three errors. What does the compiler do?
It reports all three errors together and no runnable program is produced
A compiler and an interpreter are both used with programs written in high-level languages. Which job do they both do?
Converting source code into machine code
What is meant by a high-level language?
A programming language close to English and maths, using keywords such as print and if, which must be translated before it can run
Which term describes the binary patterns that a processor can carry out directly without being translated first?
Machine code
What is meant by source code?
The program that a programmer writes in a high-level or low-level language, before it is translated into machine code
Compilers and interpreters are both examples of which type of program?
A translator
Which term describes the part of an IDE where a programmer types, changes and saves the code they have written?
Editor
What is meant by error diagnostics in an IDE?
Facilities that report the type of an error and the line where it was found, so it can be fixed
What is the name for the tool in an IDE that turns source code into machine code so that the program can be run?
Translator
What is the name for the program written by a programmer, which is turned into machine code before it can be run?
Source code
What is an integrated development environment (IDE)?
One piece of software that provides the tools for developing a program
A programmer keeps mistyping the name of a variable. How can the editor help reduce these mistakes?
It suggests names already used as the programmer types
A program runs but works out the wrong total. Why do the error diagnostics not report this problem?
The code breaks no rules of the language
What does the run-time environment allow a programmer to do?
Run the program from inside the IDE to test it
A running program crashes when it tries to divide by zero. Which part of the IDE shows what went wrong and where it happened?
The run-time environment
Why does using an IDE speed up program development compared with using separate programs?
All the tools are in one place, so there is no switching
A programmer clicks Run in an IDE and the output of the program appears. Which two tools of the IDE have been used?
The translator and the run-time environment
A programmer is still typing when the IDE underlines part of the code and shows a message that it breaks the rules of the language. Which tool of the IDE is doing this?
The error diagnostics
The editor of an IDE shows keywords, strings and comments in different colours. How does this help the programmer develop a program?
It makes the code easier to read
A programmer makes a small change and wants to see the result straight away. What does the IDE let them do?
Translate and run the program without leaving the IDE
A programmer wants to give a finished program to someone who does not have an IDE. Why must the program be translated first?
The computer can only run machine code