NEW
Font size
WorksheetsGenerations of Programming Languages & Documentation
Total questions: 26
Worksheet time: 13mins
What is the primary characteristic of first-generation languages (1GL)?
Uses mnemonics
Uses binary instructions (0s and 1s)
Uses human-like syntax
Uses object-oriented principles
Why are first-generation languages considered machine-dependent?
Each CPU has a unique instruction set
They are written in high-level code
They use English-like syntax
They can be compiled across all hardware
What is an example of a first-generation language?
C
Assembly
Machine code
Java
What is one major disadvantage of first-generation languages?
They are too user-friendly
They are easy to debug
They are difficult to read and write
They require no hardware knowledge
What is an advantage of first-generation languages?
They have slow execution speeds
They use symbolic mnemonics
They execute directly on hardware without translation
They are portable across multiple systems
What is a key improvement of second-generation languages over first-generation languages?
Uses mnemonics instead of binary
Uses high-level programming concepts
Can be written without an assembler
Is completely hardware-independent
Which tool is required to convert assembly code into machine code?
Compiler
Assembler
Interpreter
Debugger
What makes assembly language easier than machine code?
Uses binary numbers directly
Uses human-like syntax
Uses symbolic instructions (e.g., MOV, ADD)
Runs without needing a CPU
Which of the following is NOT a characteristic of assembly language?
Uses mnemonics like MOV, ADD
Requires an assembler
Runs directly on hardware
Is specific to a processor
What is a limitation of assembly language compared to higher-level languages?
It is faster than machine code
It is highly readable
It is hard to debug and maintain
It does not interact with hardware
What is a key characteristic of third-generation languages (3GL)?
Uses binary directly
Uses mnemonics
Uses structured human-readable syntax
Is machine-dependent
Which of the following is a third-generation programming language?
Assembly
Python
SQL
Machine Code
What is an advantage of 3GLs over 2GLs?
They require detailed knowledge of hardware
They can be directly executed by the CPU
They use high-level syntax and are easier to read
They use binary numbers
What is required for a 3GL program to run on a computer?
Manual memory allocation
Direct CPU execution
Compilation or interpretation
No conversion needed
Which of the following is NOT an example of a 3GL?
Java
FORTRAN
Prolog
C++
What is a 4GL primarily used for?
Direct hardware programming
Artificial intelligence
Database management and business applications
Writing operating systems
Which of the following is an example of a 4GL?
Python
SQL
Java
C++
What is the key concept behind 5GL programming?
Uses procedural instructions
Uses logic and constraints to solve problems
Requires manual memory allocation
Works only with low-level programming
What is an example of a 5GL?
Prolog
C++
Java
Assembly
What is the primary purpose of documentation in programming?
To slow down development
To help programmers, maintainers, and users understand the program
To replace testing
To increase code complexity
Which of the following is a key benefit of documentation?
Makes debugging, upgrading, and fixing issues easier
Eliminates the need for comments in code
Allows code to run faster
Makes programs harder to modify
Which of the following is NOT a feature of internal documentation?
Using meaningful variable names
Adding comments to explain code
Using indentation for readability
Writing code in a single continuous line
What is an example of a bad variable name in code?
int x, y;
int totalMarks;
int finalScore;
int maxMarks;
Why should you use indentation in programming?
It makes code run faster
It improves readability
It reduces debugging time by 100%
It prevents syntax errors
How much can good documentation reduce debugging time?
10%
25%
50%
75%
Why is documentation essential for new team members?
It helps them get up to speed faster
It forces them to learn on their own
It makes programming harder
It replaces code reviews
