1.Which generation of programming language is machine code?
Easy
AFirst generation
BSecond generation
CThird generation
DFourth generation
2.What is a mnemonic in assembly language?
Easy
AAn abbreviated text command such as LDA or STA
BA binary number representing an instruction
CA high-level English-like statement
DA memory address in RAM
3.Which of the following is an advantage of using a high-level language over a low-level language?
Easy
ADirect control over hardware
BEasier to read and write
COccupies less memory
DFaster execution
4.How does a compiler translate high-level language code?
Medium
AIt translates one line at a time and executes immediately
BIt translates all the code in one go before execution
CIt translates code using mnemonics
DIt translates code into assembly language first
5.A program written in a high-level language is being developed. Which translator is most suitable during the development stage?
Medium
AAssembler
BCompiler
CInterpreter
DLinker
6.What does an assembler translate?
Easy
AHigh-level language to machine code
BAssembly language to machine code
CMachine code to assembly language
DHigh-level language to assembly language
7.Which of the following is a feature of an Integrated Development Environment (IDE)?
Easy
AAssembler
BPrettyprint
COperating system
DDatabase management system
8.Which of the following best describes why a program written in a high-level language must be translated before execution?
Medium
ATo make the code easier to read
BTo convert it into machine code that the processor can understand
CTo reduce the file size
DTo add comments to the code
もっと問題
9.What is a disadvantage of using an interpreter compared to a compiler?
Medium
AIt is easier to debug
BIt creates an executable file
CIt has slower execution speed
DIt optimises the code
10.Which of the following is an example of a high-level language?
Easy
AAssembly language
BMachine code
CPython
DLDA
11.Which IDE tool allows a programmer to step through code line by line to find logic errors?
Easy
AEditor
BPrettyprint
CDebugger
DRun-time environment
12.One assembly language instruction translates into how many machine code instructions?
Easy
AOne
BMany
CNone
DDepends on the instruction
13.A programmer is writing a device driver that must directly control a hardware register. Which type of programming language is most suitable for this task?
Medium
ALow-level language
BHigh-level language
CFourth-generation language
DObject-oriented language
14.A program written in a high-level language is translated by an interpreter. The program contains a loop that runs 1000 times. How many times does the interpreter translate the code inside the loop?
Medium
A1
B1000
COnce per line of code
DIt depends on the number of errors
15.Which of the following is a feature of an IDE that helps a programmer identify logical errors in their code?
Easy
APrettyprint
BDebugger
CAuto-completion
DRun-time environment
16.A company distributes a compiled executable of their software. Which of the following is an advantage of this distribution method?
Medium
AThe user can view and modify the source code
BThe software can run without needing a translator on the user's computer
CThe software runs slower than interpreted code
DThe executable is portable across all processors
17.Which generation of programming language is assembly language?
Easy
AFirst generation
BSecond generation
CThird generation
DFourth generation
18.A program is being developed and the programmer wants to test each line as it is written. Which translator should be used?
Medium
AAssembler
BCompiler
CInterpreter
DLinker
19.Which of the following is a disadvantage of using a compiler compared to an interpreter?
Medium
ACompiled code runs slower
BCompiled code is harder to debug
CCompiled code requires more RAM to run
DCompiled code cannot be distributed
20.In an IDE, which tool is used to automatically complete code as the programmer types?
Easy
ADebugger
BPrettyprint
CAuto-completion
DRun-time environment
21.A program written in assembly language has 50 instructions. How many machine code instructions will it translate into?
Medium
A50
BMore than 50
CLess than 50
DIt depends on the mnemonics used
22.A programmer is writing a program in a high-level language. She uses an interpreter during development. Which of the following best describes how the interpreter translates the program?
Medium
AIt translates the entire program into machine code in one go, then executes it.
BIt translates and executes the program one line at a time.
CIt translates the program into assembly language, then assembles it.
DIt translates the program into an intermediate code, then interprets that code.
23.Which of the following is a first-generation programming language?
Easy
AAssembly language
BPython
CMachine code
DC++
24.A program written in a high-level language is translated by a compiler. Which of the following is an advantage of using a compiler rather than an interpreter?
Medium
AThe program can be debugged more easily.
BThe program runs faster after compilation.
CThe program uses less memory during compilation.
DThe program can be edited more easily after compilation.
25.A programmer is developing a program that must directly control a hardware register in a device driver. Which type of programming language is most suitable for this task?
Medium
AA high-level language like Python
BA low-level language like assembly
CA fourth-generation language
DA scripting language like JavaScript
26.Which of the following is a mnemonic used in assembly language?
Easy
APRINT
BLDA
Cif
Dwhile
27.What is the role of an assembler?
Easy
AIt translates high-level language into machine code.
BIt translates assembly language into machine code.
CIt translates machine code into assembly language.
DIt translates one high-level language into another high-level language.
28.A program written in a high-level language is being developed. The programmer wants to test each line as it is written. Which translator should be used?
Easy
AAssembler
BCompiler
CInterpreter
DLinker
29.A program contains a loop that runs 1000 times. The program is translated by an interpreter. How many times does the interpreter translate the code inside the loop?
Medium
AOnce
B1000 times
CUntil an error is found
DIt depends on the number of lines in the loop
30.Which of the following is a feature of an Integrated Development Environment (IDE) that helps a programmer identify logical errors in their code?
Easy
AAuto-completion
BPrettyprint
CDebugger
DCompiler
31.A programmer writes a program in a high-level language. The program contains a loop that runs 1000 times. If an interpreter is used, how many times is the code inside the loop translated?
Medium
A1000
B1
C0
DIt depends on the number of errors
32.A program is written in assembly language. How many machine code instructions will 20 assembly language instructions translate into?
Medium
A20
BMore than 20
CFewer than 20
DDepends on the assembler
33.A programmer is developing a device driver that must directly control a hardware register. Which type of programming language is most suitable for this task?
Medium
AHigh-level language
BLow-level language
CFourth-generation language
DObject-oriented language
34.A program written in a high-level language is translated by a compiler. The program contains a loop that runs 1000 times. How many times does the compiler translate the code inside the loop?
Medium
A1000
B1
C0
DIt depends on the number of errors
35.A program written in assembly language contains 30 instructions. How many machine code instructions will it translate into?
Medium
A30
B1
C60
DDepends on the assembler
36.A programmer writes a program in a high-level language. The program is translated using a compiler. After fixing a syntax error, what must the programmer do before running the program again?
Medium
ARecompile the entire program
BOnly recompile the changed line
CUse an interpreter to run the program
DNo action needed, the compiler fixes it automatically
37.A student is writing a program in a high-level language. They want to test each line of code as it is written and see the results immediately. Which translator should they use?
Easy
AInterpreter
BCompiler
CAssembler
DLinker
38.Which of the following is a disadvantage of using a high-level language compared to a low-level language?
Medium
AThe user cannot directly manipulate the hardware
BIt is more difficult to read and write
CIt is machine dependent
DIt produces larger executable files
39.Which of the following is an example of a mnemonic used in assembly language?
Easy
ALDA
BFOR
C10110011
Dprint
40.Which of the following is an advantage of using a low-level language over a high-level language?
Medium
AEasier to read and write
BPortable across different computers
CDirect control over hardware components
DOne line of code can perform multiple commands
41.Assembly language is a third-generation high-level language.
Easy
True or false?
42.Which translator is used to convert assembly language into machine code?
Easy
AAssembler
BCompiler
CInterpreter
DLinker
43.A compiler translates high-level language code one line at a time.
Easy
True or false?
44.Which of the following is an advantage of using an interpreter over a compiler?
Medium
AEasier to debug
BFaster execution
CProduces an executable file
DOptimises the code
45.Which of the following are tools or facilities typically found in an Integrated Development Environment (IDE)? (Select all that apply)
Medium
AEditor
BAssembler
CDebugger
DSpreadsheet
46.Match each generation of programming language to its correct description.
Medium
First generation
Second generation
Third generation
Machine code
Assembly language
High-level language
47.Arrange the following steps in the order they occur when a high-level language program is compiled and executed.
Medium
Source code is written
Compiler translates source code to machine code
Executable file is created
Processor executes the machine code
48.Match each programming language generation to its correct description.
Medium
First generation
Second generation
Third generation
Machine code, binary instructions
Assembly language, mnemonics
High-level languages like Python
49.Which of the following are advantages of using a low-level language over a high-level language? (Select all that apply)
Medium
AEasier to read and write
BComplete control over system components
CPortable across different computers
DOccupy less memory and execute faster
EDirect manipulation of hardware
50.An assembler is used to translate high-level language code into machine code.
Easy
True or false?
51.Complete the sentence:
Easy
One assembly language instruction translates to ____ machine code instruction(s).
52.State one reason why a programmer might choose to write a program in assembly language rather than a high-level language.
Medium
53.Complete the sentence.
Easy
In an IDE, the ____ tool allows a programmer to step through code line by line to find logic errors.
54.A program written in assembly language contains 15 instructions. How many machine code instructions will it translate into?
Easy
55.A program written in assembly language contains 15 instructions. How many machine code instructions will it translate into?