Programming Languages Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are programming languages?

A

Programming languages are specially written code used for writing software

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

What are the two categories of programming languages?

A
  • High-level programming languages
  • Low-level programming languages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define high-level programming languages.

A

High-level programming languages abstract many complexities of interfacing with hardware, providing a simpler and more understandable set of grammar for developers.

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

Define low-level programming languages

A

Low-level programming languages work closer with hardware on a computer, allowing developers to have direct access to hardware resources.

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

What are the 3 translation software used to convert program code into machine code?

A
  • Assemblers
  • Compilers
  • Interpreters
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of an assembler?

A

Assemblers translate Assembly Language instructions into machine code

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

How do compilers differ from interpreters?

A

Compilers translate high-level program code into machine code in one go, creating an executable file.

Interpreters translate high-level program code instruction-by-instruction.

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

Give examples of compiled programming languages

A

C++
Java

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

Give examples of interpreted programming languages

A

Python
JavaScript,

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

What are the advantages/disadvantage of using Low-level programming languages?

A

Disadvantage :

-Difficult to develop programs not human-readable
-Not portable written specifically for a hardware
-Harder to debug (as they are being executed on the CPU immediately)
-Little to no abstraction in the program (need to state explicitly how to perform every task)

Advantage:
-Easier to use as CPU-specific instructions can be used
-Provide direct access to hardware.

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

What are the advantages/disadvantage of using High-level programming languages?

A

Advantages
Human-friendly language
Easy to understand
Easy to debug

Disadvantages
Less memory efficient
Harder to optimise for specific hardware
Portable (can be executed on other hardware without changes)
Hardware independent

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

What is an assembler?

A

An assembler is a program that translates assembly language code into machine code

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

What is a compiler?

A

A compiler is a program that translates high-level programming language code into machine code all at once.

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

What is an interpreter?

A

An interpreter is a program that translates high-level programming language code into machine code line by line during execution.

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

What are the advantages of using assemblers?

A

Assemblers produce fast and efficient machine code, allowing for direct control over hardware resources.

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

What are the disadvantages of using assemblers?

A

Assemblers require a deep understanding of hardware architecture, making programming more complex and error-prone.

17
Q

What are the advantages of using compilers?

A

Compilers produce optimised machine code, resulting in faster execution and better performance.

They also generate executable files that can be run independently of the source code.

18
Q

What are the disadvantages of using compilers?

A

Compiling code can be time-consuming, especially for large programs.

Additionally, debugging compiled code may be more challenging due to the lack of direct correlation between source code and machine code.

19
Q

What are the advantages of using interpreters?

A

Interpreters allow for quick prototyping and experimentation as they translate code line by line, providing immediate feedback.

They also make debugging easier since errors are reported as they occur.

20
Q

What are the disadvantages of using interpreters?

A

Interpreted code tends to run slower than compiled code since translation happens during execution.

Interpreters also require the presence of the original source code, making distribution and deployment more complex.