Programming Languages & Integrated Development Environments (IDEs) Flashcards

All 18 cards in this deck

What is a high-level programming language?

A programming language written in a form close to human language, which must be translated into machine code by a compiler or interpreter before it can run.

What is a low-level programming language?

Machine code or assembly language — written for one specific type of processor and giving direct control of the hardware and memory.

Give two reasons why some programs are written in a low-level language.

Direct control of hardware/memory; faster execution time.
e.g. also accepted: machine code does not need translating, code can be optimised / use less memory.

Give two reasons why a programmer would choose a high-level language.

It is easier and quicker to write, read and maintain; it is portable, so the same source code can be translated to run on different types of computer.

True or false? Machine code must be translated before a computer can run it.

False. Machine code does not need to be translated / compiled / interpreted — the processor executes it directly.

What is the purpose of a translator?

To convert source code into machine code so that the computer can execute the program.

Why do programs written in a high-level language need a translator?

Because a processor can only execute machine code (binary instructions), so high-level source code cannot be run directly.

Describe the characteristics of a compiler.

It translates the whole program in one go before it is run, produces an executable file, and reports all errors together at the end of compilation.

Describe the characteristics of an interpreter.

It translates and executes the program one line at a time, stops execution when it finds an error, and produces no executable file.

Give two benefits of using a compiler instead of an interpreter.

It produces an executable file, so end users do not need a translator; the program runs faster than the interpreted version.
e.g. also accepted: it only needs translating once, and the compiler can optimise the code.

What does IDE stand for?

Integrated Development Environment — software providing tools that help a programmer write, run and debug programs.

How does the editor in an IDE help a programmer develop a program?

It allows program code to be written, entered and changed (and errors fixed), with features such as line numbering, auto-indent, keyword highlighting and autocomplete.

How do error diagnostics (the debugger) in an IDE help a programmer?

They identify and find errors, show the location and detail of each error, and can suggest fixes.

What does the run-time environment (output window) in an IDE let a programmer do?

Run/execute the program inside the IDE and see its output.

What does the translator built into an IDE do for the programmer?

Converts the source code into low-level/machine code so the program can be run; a compiler also produces an executable file.

Which IDE tool lets a programmer stop a running program at a chosen line to check it?

A break point.

Which IDE tool lets a programmer see the contents of variables and how they change while a program runs?

Variable watch.

A programmer is still writing and testing a program, changing it after every run. Should they use a compiler or an interpreter, and why?

An interpreter — it runs the code straight away without re-translating the whole program, and stops at the error so its location is easy to find.