0% found this document useful (0 votes)
20 views6 pages

Computer 9

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

Computer 9

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Computer 9

1. Which Victorian social class was characterized by inherited wealth and political
power?
A. Working Class
B. Middle Class
C. Upper Class
2. How was social status often displayed in Victorian England?
A. Through the way one dressed and spoke
B. By the size of one’s house only
C. By owning a business
3. What made moving between social classes difficult in Victorian society?
A. Enforced traditions and social expectations
B. Government laws forbidding it
C. Different languages spoken
4. What distinguishes a first-generation programming language (1GL)?
A. Uses symbolic words called mnemonics
B. Machine understands it directly in binary code
C. Portable across many computers
5. Assembly languages belong to which generation of programming languages?
A. First generation (1GL)
B. Second generation (2GL)
C. Third generation (3GL)
6. What is a major advantage of third generation languages (3GL)?
A. Easier for programmers to write and read
B. Programs run only on specific machines
C. Written only in binary code
7. Which of the following is NOT an example of a third-generation programming
language?
A. Fortran
B. Binary code
C. Pascal
8. Why did early programming languages focus more on the computer’s convenience
than the programmer’s?
A. Computers had limited computing power
B. Programmers preferred machine language
C. Computers could only understand human languages
9. Machine-dependent programming languages mean:
A. Programs need to be rewritten or translated for different computers
B. The language can be used on any computer without change
C. Programs are written in human language
10. What role do compilers play in programming with 3GL languages?
A. They translate human-readable code into machine code
B. They slow down the program execution
C. They run programs on the computer directly
11. Fourth generation languages (4GL) are mainly described as:
A. Machine-level languages
B. Non-procedural languages focused on what to do
C. Assembly languages
12. A key feature of 4GL is that it allows programmers to:
A. Write binary code directly
B. Specify the result/output rather than process steps
C. Control hardware at a very low level
13. Which of these is an example of a 4GL?
A. SQL
B. C
C. Assembly
14. 4GL programming languages often support:
A. Graphical user interface (GUI) development
B. Direct manipulation of processor registers
C. Writing detailed machine instructions
15. The main goal of 4GLs is to:
A. Increase programming complexity
B. Reduce programming effort and time
C. Require programmers to write more detailed code
16. Fifth generation languages (5GL) emphasize:
A. Writing explicit step-by-step algorithms
B. Solving problems using constraints and rules
C. Writing machine code
17. Which is a known 5GL language?
A. Prolog
B. Fortran
C. Basic
18. 5GLs are highly suitable for:
A. Artificial Intelligence applications
B. Low-level systems programming
C. Simple arithmetic operations
19. An imperative programming language is focused on:
A. Describing how to do something step-by-step
B. Describing what the solution looks like
C. Using natural language to create programs
20. Functional programming languages focus primarily on:
A. Changing program state through commands
B. Evaluating expressions and functions
C. Writing procedural instructions
21. Logic programming languages specify:
A. How to solve the problem step by step
B. What properties the solution must satisfy
C. Machine code instructions
22. Which paradigm is “how”-oriented?
A. Imperative
B. Functional
C. Logic
23. Which programming language is NOT an example of functional programming?
A. Lisp
B. Haskell
C. COBOL
24. Which language is a logic programming language?
A. Prolog
B. Ada
C. Fortran
25. Common disadvantage of 4GLs is:
A. High memory consumption
B. Very low productivity
C. Lack of English-like syntax
26. Which describes one advantage of 4GL?
A. Programs run faster than 1GL
B. Programs require less coding effort
C. Programs need complex instructions for hardware
27. In 5GL, the programmer mainly:
A. Specifies procedural steps
B. Defines constraints or rules
C. Writes assembly code
28. Imperative languages evolved from:
A. High-level languages like Python
B. Machine and assembly languages
C. Logic programming
29. An example of an imperative language is:
A. Ada
B. Scheme
C. Prolog
30. Which programming paradigm describes programs as logical theories?
A. Logic programming
B. Imperative programming
C. Functional programming
Part B: True or False (10 items)
_________1. 4GLs allow users to develop applications without detailed knowledge of the
underlying procedures.
_________2. Fifth generation languages operate by explicitly programming every step of
the algorithm.
_________3. Imperative programming is sometimes called “how”-oriented because it
specifies the steps to solve a problem.
_________4. Functional languages emphasize the evaluation of functions rather than
changes in program state.
_________5. Logic programming uses sets of rules to let the computer infer solutions.
_________6. 4GLs are known for requiring programmers to write complex low-level code.
_________7. 5GLs are particularly useful in expert systems and neural networks.
_________8. Assembly language is an example of a fifth-generation language.
_________9. SQL is commonly classified as a fourth-generation language.
_________10. The main concern of logic programming languages is how to compute the
solution.

For each item below, write the correct term or concept that matches the description.
__________________1. The blueprint or template from which objects are created; it defines
properties and behaviors common to a group of objects.
__________________2. An individual instance created from a class that has specific
attributes and can perform methods.
__________________3. A function associated with a class that defines the behavior or
actions an object can perform.
__________________4. The principle of bundling data and methods within a class, hiding
internal details from outside access.
__________________5. The OOP concept that allows a new class to inherit properties and
methods from an existing class.
__________________6. The concept where one name can take many different forms
depending on the context in OOP.
__________________7. The process of hiding unnecessary implementation details and
exposing only essential features of an object.
__________________8. A programming approach that models real-world entities as objects
with attributes and behaviors.
__________________9. A programming language example of object-oriented programming.
__________________10. The term for code written by programmers before it is compiled
into machine-readable form.
__________________11. Machine code that is the output of the compilation process.
__________________12. A programming approach that executes two or more operations
simultaneously to improve performance.
__________________13. Programming paradigm where programs are written as a
declarative set of rules from which solutions are inferred.
__________________14. The term for a program that translates assembly language into
machine code.
__________________15. The programming paradigm focused on specifying 'how' a
computation should take place through explicit commands.
__________________16. The programming paradigm that views computations as
mathematical function evaluations.
__________________17. The term describing a program that can be transferred and run on
different computer platforms without rewriting.
__________________18. The term used for a group of processors sharing common design or
architecture features.
__________________19. Breaking a program into smaller reusable modules or subprograms.
__________________20. A kind of programming where programs run on multiple processors
or computers simultaneously.
Write the correct term in the blank.
1. In C++, a ________ is a blueprint or template that defines properties and behaviors
shared by a group of objects.
2. An ________ is an individual instance created from a class.
3. The process of combining data and functions that operate on that data within a class
is called ________.
4. When a new class is created based on an existing class and inherits its properties and
functions, this is known as ________.
5. ________ means “many forms” and refers to a function or method having multiple
forms depending on context.
6. ________ programming models real-world entities as objects with their own attributes
and behaviors.
7. The “C factor” in C++ means it builds on the language ________.
8. Grouping a program into smaller subtasks under a structured approach is called
________.
9. ________ is a function or subprogram designed to perform a specific task.
10. When code for an object can be written independently and reused, this is referred
to as ________.
Choose the best answer and encircle the letter of the correct answer.
1. Which programming paradigm does C++ primarily support?
A. Procedural
B. Object-Oriented Programming
C. Logic
2. What essential concept allows C++ to model real-world entities?
A. Procedural abstraction
B. Classes and objects
C. Assembly instructions
3. What does encapsulation hide from the user of a class?
A. The syntax of the programming language
B. The internal workings and details of the class
C. The names of objects
4. Inheritance allows a new class to:
A. Be unrelated to existing classes
B. Use properties and behaviors of an existing class
C. Be written only from scratch
5. Polymorphism allows:
A. One function to have many different forms or implementations
B. Multiple classes to be merged into one
C. The program to run faster
6. Which of the following is NOT a benefit of using classes and objects?
A. Modularity
B. Code reuse
C. Writing all code in binary
7. What is the relationship between a class and an object?
A. Classes are instances of objects
B. Objects are instances of classes
C. Classes and objects are the same
8. The “blueprint” or “plan” analogy used in OOP refers to:
A. Object
B. Class
C. Compiler
9. Which feature of C++ was designed to allow programmers unfamiliar with C to begin
using it?
A. The “C factor”
B. Polymorphism
C. Encapsulation
10. Which of these is NOT an example of an object in programming?
A. Car
B. Number
C. Compiler
11. How does encapsulation improve program usability?
A. By hiding complex details from users
B. By allowing direct access to memory
C. By requiring programmers to write more code
12. C++ was created to preserve the efficiency of:
A. Java
B. Python
C. C
13. Which programming approach breaks a program into several small subtasks?
A. Top-down structured approach
B. Object-oriented approach
C. Logic programming approach
14. Which of the following represents data elements of a class?
A. Methods
B. Attributes
C. Objects
15. What allows a new cellphone to have additional functions yet still perform original
functions?
A. Polymorphism
B. Inheritance
C. Encapsulation

You might also like