0% found this document useful (0 votes)
21 views

Comprog Mock Test Midterms

Uploaded by

Kurt Ensomo
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)
21 views

Comprog Mock Test Midterms

Uploaded by

Kurt Ensomo
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
You are on page 1/ 12

COMPUTER PROGRAMMING

(MIDTERMS) MOCK EXAM BY


WILLIE YUBERT
I. IDENTIFICATION (20 points)
Instructions: Identify the following terms based on the provided descriptions. Write
your answer on the space provided. (Each question is worth 1 point.)
1. The graphical representation of an algorithm.
2. A low-level language close to the hardware with little abstraction from the
computer's instruction set.
3. This programming language was designed by the U.S. Department of Defense
in the 1970s.
4. The testing method where the tester knows nothing about the program.
5. A named item used to specify a memory cell with a fixed amount.
6. The first high-level programming language developed in the 1950s.
7. A programming paradigm where computation is carried out using objects as
the basic units.
8. The process of converting a high-level language into machine code, scanning
the whole program at once.
9. The input/output symbol in flowcharting.
10.The programming process where instructions are incrementally carried out,
often involving procedures and routines.
11.The low-level programming language that uses symbolic names instead of
binary codes.
12.A high-level programming language widely used in e-commerce.
13.This person is considered the first computer programmer.
14.The symbol used in a flowchart for indicating preparation steps.
15.A tool used to organize and manage the structure of programs through
modular connections.
16.What is the main advantage of using procedural programming?
17.Which language is known for being used in business applications during the
1950s?
18.Which testing method assumes the tester knows the internal workings of the
program?
19.A general-purpose programming language that was developed by Sun
Microsystems in the 1990s.
20.The part of the program development process responsible for enhancing and
maintaining the software after its initial creation.

II. MULTIPLE CHOICE (40 points)


Instructions: Choose the correct answer for each question. (Each question is worth
1 point.)
1. Which of the following is a high-level programming language?
o a) Assembly

o b) Machine Language

o c) Java

o d) Hexadecimal

2. In flowcharting, which symbol is used for decision-making?


o a) Parallelogram

o b) Diamond

o c) Rectangle

o d) Oval

3. Which of the following programming languages is developed by Microsoft for


creating applications on the .NET platform?
o a) C++

o b) Python

o c) C#

o d) Pascal

4. What is the first step in writing and testing a program?


o a) Linking the program

o b) Compiling the program

o c) Writing and editing the program


o d) Executing the program

5. Which of the following is NOT a flowcharting guideline?


o a) Symbols are interconnected using arrows

o b) All symbols have one indicator branching out except for the
diamond symbol
o c) Multiple decision symbols must always lead to the same result

o d) Arrows indicate the direction to be followed

6. Which of the following is considered a low-level programming language?


o a) Python

o b) C++

o c) COBOL

o d) Assembly

7. What is the term used for a list of steps for solving a problem in
programming?
o a) Algorithm

o b) Pseudocode

o c) Flowchart

o d) Paradigm

8. What type of flowchart structure involves performing each stage exactly once
in order?
o a) Modular

o b) Sequential

o c) Selection

o d) Repetition

9. Which of the following is an advantage of low-level programming languages?


o a) Machine independent

o b) Easy to develop and maintain

o c) Fast and memory efficient

o d) Portable

10.What does BASIC stand for in programming languages?


o a) Beginner's Automated Symbolic Instruction Code

o b) Beginner's All-purpose Symbolic Instruction Code

o c) Business Automated Symbolic Instruction Code

o d) Beginner's Algorithmic Symbolic Instruction Code

11.In which decade was the Python programming language developed?


o a) 1970s

o b) 1980s

o c) 1990s

o d) 2000s

12.Which of the following languages is best known for its use in academic
applications and e-commerce?
o a) COBOL

o b) Python

o c) FORTRAN

o d) Assembly

13.What is the first step in procedural programming?


o a) Define the output

o b) Break down the problem into smaller tasks

o c) Start coding functions

o d) Create pseudocode

14.Which of the following programming languages is an example of a high-level


language?
o a) C

o b) Assembly

o c) C++

o d) Machine Language

15.Which language was specifically designed to teach computer programming?


o a) Pascal

o b) Ruby

o c) Assembly
o d) C#

16.Which tool is used to visually represent the flow of an algorithm?


o a) Pseudocode

o b) Flowchart

o c) Algorithm

o d) Hierarchy Chart

17.Which is NOT a step in the program development process?


o a) Writing and editing

o b) Linking

o c) Creating hardware modules

o d) Testing

18.Which programming paradigm is described as having a top-down approach


where the main focus is on functions?
o a) Object-oriented programming

o b) Procedural programming

o c) Modular programming

o d) Event-driven programming

19.The __________ symbol is used for terminal start/end in flowcharting.


o a) Parallelogram

o b) Rectangle

o c) Oval

o d) Diamond

20.In a high-level language, what term is used to describe a tool that checks
syntax and compiles code into machine language?
o a) Interpreter

o b) Compiler

o c) Debugger

o d) Assembler

(Additional 20 multiple choice questions can be constructed by drawing from similar


concepts in programming paradigms, development processes, language
characteristics, etc.)
III. ENUMERATION (20 points)
Instructions: Enumerate the following items. (Each question is worth 2 points.)
1. Programming paradigms mentioned in the reviewer.
2. Four steps in writing and testing a program.
3. Five types of flowchart symbols and their corresponding functions.
4. Four structures in flowcharting.
5. Five low-level and high-level programming languages.
6. Five advantages or disadvantages of low-level programming languages.
7. Five key features of object-oriented programming.
8. Five steps in program logic formulation.
9. Five key differences between compilers and interpreters.
10.Five guidelines for preparing a flowchart.

IV. SHORT ANSWER (20 points)


Instructions: Answer the following questions concisely but with sufficient detail.
(Each question is worth 5 points.)
1. Explain the key differences between blackbox and whitebox testing.
2. Discuss the importance of modular programming and how it simplifies
program development.
3. Describe the role of a compiler in the programming process and how it differs
from an interpreter.
4. How does the program development process ensure that software is both
functional and maintainable?

V. TRUE OR FALSE (30 points)


Instructions: Write TRUE if the statement is correct and FALSE if it is not. (Each
question is worth 1 point.)
1. High-level programming languages are machine-dependent.
2. Assembly language is considered a low-level programming language.
3. A hierarchy chart is used to visually represent the flow of an algorithm.
4. Object-oriented programming focuses primarily on functions rather than
objects.
5. COBOL was developed for scientific applications.
6. A compiler converts source code into machine-readable binary code all at
once.
7. A constant in programming refers to a memory cell whose value can change
throughout the program's execution.
8. Flowcharts can only use one symbol for each step in the program’s execution.
9. Debugging is the process of writing a program for the first time.
10.Machine language consists of binary code made up of 0s and 1s.
11.Pseudocode is used to write an algorithm in a way that closely resembles
programming code.
12.An interpreter translates the entire program into machine code before
executing it.
13.In procedural programming, the program is broken down into small parts
called objects.
14.Testing and debugging are the final steps in the program development
process.
15.The C programming language was developed at Bell Laboratories in the
1970s.
16.Blackbox testing involves the tester having full knowledge of the internal
workings of the program.
17.The diamond symbol in flowcharting represents a decision point.
18.Object-oriented programming makes it difficult to add new data and
functions.
19.Machine language is highly portable across different hardware systems.
20.Visual Basic was designed to create Windows-based applications quickly.
21.Low-level languages are generally faster and more memory-efficient than
high-level languages.
22.The oval symbol in flowcharting indicates the start or end of a process.
23.FORTRAN is mainly used in business-oriented applications.
24.C++ is an extension of the C programming language with added features for
object-oriented programming.
25.An algorithm is a graphical representation of a process or program.
26.Modular programming is also known as "divide and conquer" because it
breaks down a large task into smaller ones.
27.Assembly language is portable and can run on any hardware system without
modification.
28.A hierarchy chart is useful for displaying the structure and connection of
various program modules.
29.A constant cannot change its value once it is assigned during program
execution.
30.In high-level programming, the term "syntax" refers to the rules that define
the structure of a valid program statement.

KEY TO
CORRECTION
I. IDENTIFICATION (20 points)
1. Flowchart
2. Low-level language
3. ADA
4. Blackbox testing
5. Constant
6. FORTRAN
7. Object-oriented programming
8. Compiler
9. Parallelogram
10.Procedural programming
11.Assembly language
12.Python
13.Ada Lovelace
14.Hexagon
15.Hierarchy chart
16.Easy to follow/maintain
17.COBOL
18.Whitebox testing
19.Java
20.Maintenance

II. MULTIPLE CHOICE (40 points)


1. c) Java
2. b) Diamond
3. c) C#
4. c) Writing and editing the program
5. c) Multiple decision symbols must always lead to the same result
6. d) Assembly
7. a) Algorithm
8. b) Sequential
9. c) Fast and memory efficient
10.b) Beginner's All-purpose Symbolic Instruction Code
11.c) 1990s
12.b) Python
13.b) Break down the problem into smaller tasks
14.c) C++
15.a) Pascal
16.b) Flowchart
17.c) Creating hardware modules
18.b) Procedural programming
19.c) Oval
20.b) Compiler

III. ENUMERATION (20 points)


1. Procedural programming, Object-oriented programming
2. Writing and editing, Compiling, Linking, Executing
3. Parallelogram (Input/Output), Rectangle (Processing), Diamond (Decision),
Oval (Start/End), Arrowhead (Flow direction)
4. Sequential, Selection, Repetition, Modular
5. Low-level: Assembly, Machine language; High-level: Java, Python, C++
6. Advantages: Fast, Memory-efficient; Disadvantages: Machine-dependent,
Difficult to debug, Not portable
7. Encapsulation, Abstraction, Inheritance, Polymorphism, Object
8. Define variables, Initialize values, Input values, Compute, Display output
9. Compiler converts the entire program, Interpreter translates line by line;
Compiler executes faster, Interpreter is memory efficient; Compiler scans the
whole program, Interpreter scans one statement at a time
10.Use start/end symbol, Connect symbols with arrows, Avoid crossing flow lines,
Use decision symbols for branching, Each process should have one entry and
exit point

IV. SHORT ANSWER (20 points)


1. Blackbox testing tests the program without knowing its internal workings,
while Whitebox testing involves knowledge of the internal logic.
2. Modular programming breaks a large task into smaller, manageable
modules, making the code easier to debug, maintain, and modify.
3. A compiler translates high-level code into machine code all at once,
producing an executable file. In contrast, an interpreter translates and
executes code line by line, without producing a separate executable.
4. The program development process ensures that the software is both
functional and maintainable by breaking down complex tasks into smaller
steps (understanding the problem, designing a solution, writing code, testing,
debugging, and maintenance).
V. TRUE OR FALSE (30 points)
1. FALSE
2. TRUE
3. FALSE
4. FALSE
5. FALSE
6. TRUE
7. FALSE
8. FALSE
9. FALSE
10.TRUE
11.TRUE
12.FALSE
13.FALSE
14.TRUE
15.TRUE
16.FALSE
17.TRUE
18.FALSE
19.FALSE
20.TRUE
21.TRUE
22.TRUE
23.FALSE
24.TRUE
25.FALSE
26.TRUE
27.FALSE
28.TRUE
29.TRUE
30.TRUE

You might also like