Unit 9: Software Programming and Development - Practice Quiz

DECAP145 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is a computer program?

What is computer Program Easy
A. A brand of processor
B. A type of computer memory
C. A physical part of the computer
D. A set of instructions that tells a computer what to do

2 A program written by a programmer in a human-readable language is called the:

What is computer Program Easy
A. Machine code
B. Object file
C. Source code
D. Binary dump

3 Which of the following is an example of application software?

What is computer Program Easy
A. A CPU
B. A hard disk
C. A power supply
D. A word processor

4 The language that a computer's processor can directly understand is called:

What is computer Program Easy
A. Machine language
B. Flowchart language
C. Pseudocode
D. English

5 A collection of programs and related data that runs on a computer is generally called:

What is computer Program Easy
A. Hardware
B. A monitor
C. Firmware chip
D. Software

6 Which type of software acts as a bridge between the hardware and application programs?

Hardware/Software Interaction Easy
A. Media player
B. Web browser
C. Spreadsheet
D. Operating system

7 Which statement about hardware and software is correct?

Hardware/Software Interaction Easy
A. Software is a physical component
B. Hardware is a set of instructions
C. Software needs hardware to run
D. Hardware runs without any software

8 A small program that lets the operating system communicate with a specific hardware device is called a:

Hardware/Software Interaction Easy
A. Text editor
B. Device driver
C. Spreadsheet
D. Compiler

9 When you press a key on the keyboard, which component processes the resulting instruction?

Hardware/Software Interaction Easy
A. The speaker
B. The printer
C. The CPU
D. The monitor

10 Where must a program be loaded before the CPU can execute it?

Hardware/Software Interaction Easy
A. Main memory (RAM)
B. The keyboard
C. The printer
D. The mouse

11 A diagram that uses symbols to show the steps of a program is called a:

Planning a Computer Program Easy
A. Web page
B. Database
C. Spreadsheet
D. Flowchart

12 Writing program logic in plain English-like statements before coding is known as:

Planning a Computer Program Easy
A. Pseudocode
B. Compiling
C. Machine code
D. Debugging

13 In a standard flowchart, which shape usually represents a decision?

Planning a Computer Program Easy
A. Rectangle
B. Circle
C. Triangle
D. Diamond

14 What is usually the first step when planning a computer program?

Planning a Computer Program Easy
A. Deleting the source code
B. Writing the final code
C. Selling the software
D. Understanding and defining the problem

15 An algorithm can best be described as:

Planning a Computer Program Easy
A. A physical part of a computer
B. A brand of software
C. A step-by-step procedure to solve a problem
D. A type of monitor

16 In a flowchart, which symbol is generally used to represent a process or action step?

Planning a Computer Program Easy
A. Diamond
B. Oval
C. Rectangle
D. Arrow

17 The process of finding and fixing errors in a program is called:

How programs Solve Problems Easy
A. Debugging
B. Planning
C. Printing
D. Compiling

18 A general model of how a program solves a problem follows the order:

How programs Solve Problems Easy
A. Input, process, output
B. Input, output, process
C. Process, input, output
D. Output, process, input

19 An error in the rules or grammar of a programming language is called a:

How programs Solve Problems Easy
A. Syntax error
B. Hardware error
C. Power error
D. Network error

20 To solve a large, complex problem with a program, it is best to:

How programs Solve Problems Easy
A. Break it into smaller subproblems
B. Remove all input steps
C. Write random code
D. Ignore the problem

21 A student writes a set of instructions in Python that reads two numbers and prints their sum. Before the CPU can execute these instructions, what must happen?

What is computer Program Medium
A. The instructions must be sent to the monitor first
B. The instructions must be translated into machine code
C. The instructions must be stored on a printer
D. The instructions must be converted into a spreadsheet

22 Which statement best distinguishes a program from an algorithm?

What is computer Program Medium
A. An algorithm needs a compiler, while a program never does
B. An algorithm runs on hardware, while a program runs only on paper
C. An algorithm is a step-by-step method, while a program is that method written in a programming language
D. An algorithm is machine code, while a program is always in English

23 A program is described as a sequence of instructions that is stored and then executed. This idea is central to which computer concept?

What is computer Program Medium
A. The open-source concept
B. The client-server concept
C. The plug-and-play concept
D. The stored-program concept

24 Which of the following is the clearest example of system software rather than an application program?

What is computer Program Medium
A. A photo editor used to crop images
B. An operating system that manages memory and devices
C. A game played for entertainment
D. A word processor used to type letters

25 A file with the .exe extension runs directly when double-clicked, while a .py file needs Python installed. What does this difference tell you?

What is computer Program Medium
A. The .exe is source code, while the .py is machine code
B. The .exe already contains machine code, while the .py needs an interpreter
C. The .exe is written in English, while the .py is not
D. The .py is faster because it is already compiled

26 When you press a key on the keyboard, which layer is most directly responsible for translating that hardware signal so applications can use it?

Hardware/Software Interaction Medium
A. The application software alone
B. The monitor's display controller
C. The power supply unit
D. The operating system through its device drivers

27 An application wants to save a file to disk but cannot access the hardware directly. How does it accomplish this?

Hardware/Software Interaction Medium
A. It converts itself into a device driver
B. It rewrites the disk's firmware itself
C. It bypasses the OS and controls the disk motor
D. It requests the service from the operating system

28 Which sequence correctly represents the layers of interaction from top to bottom?

Hardware/Software Interaction Medium
A. Operating System → Hardware → Application
B. Application → Operating System → Hardware
C. Application → Hardware → Operating System
D. Hardware → Application → Operating System

29 A new printer is connected but does not work until specific software is installed. What is this software called and what does it do?

Hardware/Software Interaction Medium
A. An antivirus that scans the printer for errors
B. A compiler that turns print jobs into source code
C. A spreadsheet that stores the printer's settings
D. A device driver that lets the OS communicate with the printer

30 During program execution, where are the active instructions and data primarily held for the CPU to access quickly?

Hardware/Software Interaction Medium
A. In RAM (main memory)
B. Inside the monitor buffer
C. In the keyboard controller
D. On the hard disk permanently

31 Why is software necessary for hardware to be useful?

Hardware/Software Interaction Medium
A. Software physically powers the hardware components
B. Hardware performs no meaningful task without instructions from software
C. Hardware can only work if it is connected to the internet
D. Hardware stores software so it does not need electricity

32 A developer draws boxes and arrows to map the flow of decisions and steps before coding. Which planning tool is being used?

Planning a Computer Program Medium
A. A firewall rule
B. A spreadsheet macro
C. A flowchart
D. A database schema

33 In a flowchart, which symbol is used to represent a decision that has multiple possible outcomes?

Planning a Computer Program Medium
A. An oval
B. A rectangle
C. A parallelogram
D. A diamond

34 Why do programmers often write pseudocode before writing actual code?

Planning a Computer Program Medium
A. It automatically compiles into machine code
B. It runs faster than the final program
C. It replaces the need for testing the program
D. It expresses program logic in plain language without worrying about syntax

35 What is the correct general order of steps in the program development process?

Planning a Computer Program Medium
A. Test → code → design → define the problem
B. Design → test → define the problem → code
C. Define the problem → design the solution → code → test
D. Code → define the problem → test → design

36 A team breaks a large program into smaller, manageable pieces that each handle one task. What planning approach is this?

Planning a Computer Program Medium
A. Random coding
B. Hardware layering
C. Modular design (decomposition)
D. Direct compilation

37 In a flowchart, what is the purpose of the oval (terminator) symbol?

Planning a Computer Program Medium
A. To store data on disk
B. To make a decision
C. To perform a calculation
D. To mark the start or end of the process

38 A program repeatedly executes a block of code until a condition becomes false. Which control structure does this describe?

How programs Solve Problems Medium
A. A loop (iteration)
B. A sequence
C. A single assignment
D. A constant declaration

39 A program must choose between two different actions based on whether a user's age is . Which control structure is required?

How programs Solve Problems Medium
A. Sequence
B. Iteration
C. Declaration
D. Selection (if-else)

40 Programs solve problems by processing input into output. In the model , what does the process stage represent?

How programs Solve Problems Medium
A. The logic and calculations applied to the data
B. The device used to display results
C. The raw data entered by the user
D. The physical storage of the program

41 A program is described as a set of instructions that is stored and then executed. In the stored-program (von Neumann) model, which characteristic most directly distinguishes a program from fixed-function hardware logic?

What is computer Program Hard
A. Instructions are permanently etched into silicon and cannot be altered
B. Instructions are limited to arithmetic and cannot perform branching
C. Instructions reside in the same addressable memory as data and can be modified at runtime
D. Instructions execute only when triggered by an external mechanical switch

42 Consider source code, object code, and an executable. Which statement correctly orders their dependence and portability characteristics?

What is computer Program Hard
A. Object code is most portable; source code must be linked before editing; the executable is human-readable
B. Source code is most portable; object code is machine-specific but unlinked; the executable is machine-specific and runnable
C. All three are equally portable because they represent the same instructions
D. The executable is most portable across CPUs; source code is CPU-specific; object code is human-readable

43 A programmer claims that an interpreted program and a compiled program are "the same program". From a purely definitional standpoint, what is the most accurate response?

What is computer Program Hard
A. They are different programs because only compiled code counts as instructions
B. They are different programs because interpreted code is not a real program
C. They are identical in execution speed because the logic is the same
D. They are the same logical program; only the translation-and-execution strategy differs

44 Why is a program written entirely in machine code considered a valid program but rarely written directly by humans today?

What is computer Program Hard
A. It runs slower than high-level code, discouraging its use
B. It is not executable without an interpreter and therefore avoided
C. It cannot represent loops or conditions, limiting its use
D. It is directly executable but error-prone and unmaintainable due to raw binary encoding

45 When an application requests to write a file to disk, the request typically passes through multiple layers. Which sequence best reflects the interaction from top to bottom?

Hardware/Software Interaction Hard
A. Application → OS system call → device driver → hardware controller
B. Application → device driver → OS system call → hardware controller
C. Application → hardware controller → OS system call → device driver
D. OS system call → application → hardware controller → device driver

46 A CPU can only execute machine instructions. Given a high-level program, which combination of components is minimally required to make it run on the hardware?

Hardware/Software Interaction Hard
A. Only firmware, which interprets high-level code natively
B. Only a compiler, since the OS is optional for any program
C. A translator (compiler/interpreter) plus an OS to load and manage execution
D. Only an OS, since it can execute high-level code directly

47 During an interrupt-driven I/O operation, why is polling generally considered less efficient than interrupts for hardware/software interaction?

Hardware/Software Interaction Hard
A. Polling wastes CPU cycles repeatedly checking device status, while interrupts notify only when ready
B. Polling cannot detect device status, so data is lost
C. Interrupts are slower because they bypass the device driver
D. Interrupts require the CPU to check devices continuously, unlike polling

48 System software and application software both interact with hardware. Which statement most accurately contrasts their access?

Hardware/Software Interaction Hard
A. System software often runs in privileged mode with direct hardware access; applications run in user mode and request services
B. Application software runs in privileged mode; system software is restricted to user mode
C. Both run in privileged mode with identical direct hardware access
D. Neither can access hardware; only firmware can

49 A program compiled for one CPU architecture fails to run on another even though both use the same operating system family. What is the primary reason?

Hardware/Software Interaction Hard
A. The machine instruction set differs, so the compiled binary is not understood by the other CPU
B. Source code cannot be compiled twice for different machines
C. High-level languages are architecture-specific and cannot be reused
D. The operating system refuses to load any external files

50 In the program development cycle, why must problem analysis and requirement specification precede algorithm design?

Planning a Computer Program Hard
A. Requirements can only be understood after the program is tested
B. A correct algorithm cannot be designed without a clear, unambiguous definition of the problem and expected outputs
C. Algorithm design produces the requirements automatically once coding begins
D. Analysis is optional because coding reveals the true problem

51 A flowchart and pseudocode both express algorithm logic before coding. Which statement best captures a meaningful trade-off between them?

Planning a Computer Program Hard
A. Flowcharts visualize control flow well but scale poorly; pseudocode scales to complex logic but hides visual flow
B. Flowcharts are executable while pseudocode must be compiled
C. Pseudocode is language-specific while flowcharts are language-independent
D. Pseudocode can only represent loops, while flowcharts represent everything else

52 During planning, a developer identifies that a required calculation depends on a value not available until runtime. What planning technique best addresses this before coding?

Planning a Computer Program Hard
A. Define it as an input variable and specify how it will be obtained and validated
B. Skip the calculation until the program is running
C. Remove the calculation because runtime values cannot be planned
D. Hard-code an assumed constant to simplify the algorithm

53 Why does modular (top-down) program design improve maintainability compared to a single monolithic block of code?

Planning a Computer Program Hard
A. It eliminates the need for algorithms entirely
B. It guarantees the program runs faster on all hardware
C. It removes the need for testing since modules are independent
D. Each module isolates a subproblem, so changes and testing can be localized without affecting others

54 A team writes detailed pseudocode but skips documenting assumptions and edge cases. What is the most likely downstream consequence?

Planning a Computer Program Hard
A. The program will not compile at all
B. The pseudocode becomes executable without translation
C. Testing becomes unnecessary because logic is complete
D. Coders make inconsistent assumptions, producing defects that surface only for boundary inputs

55 An algorithm to find the maximum in a list initializes max to the first element rather than to . Why is this the more robust choice?

How programs Solve Problems Hard
A. Initializing to the first element handles negative values and empty-guarded lists correctly
B. Initializing to the first element avoids the need for a loop
C. Initializing to is faster on all hardware
D. Initializing to works for any list of any values

56 Two algorithms solve the same problem: Algorithm A runs in and Algorithm B in . For a small input of , A completes faster. What is the correct interpretation?

How programs Solve Problems Hard
A. Complexity analysis is invalid for values below
B. Big-O is wrong because B should always be faster
C. Asymptotic complexity describes scaling for large ; for small constant factors can make A faster
D. A is permanently the better algorithm for all inputs

57 A problem-solving process follows: understand the problem, devise a plan, carry out the plan, then review. Which activity best represents the "review" step in program development?

How programs Solve Problems Hard
A. Defining the inputs and outputs of the problem
B. Testing outputs against expected results and refining the algorithm for missed cases
C. Choosing a programming language for the solution
D. Writing the first line of source code

58 A recursive solution and an iterative solution both compute the same result. On a system with a small call stack, the recursive version crashes for large inputs while the iterative one succeeds. What is the root cause?

How programs Solve Problems Hard
A. Iteration uses more memory but avoids computation errors
B. Deep recursion consumes stack frames until the stack overflows, unlike the iterative loop
C. Recursion produces incorrect logic for large numbers
D. The compiler cannot translate recursive functions

59 An algorithm uses a loop with condition while (x != 0) and decrements x by 2 each iteration. Starting from an odd positive x, what problem arises and why?

How programs Solve Problems Hard
A. The loop terminates correctly for all starting values
B. An infinite loop occurs because x never equals exactly when starting odd and stepping by
C. The loop runs exactly once regardless of x
D. The loop never executes because the condition is false initially

60 When decomposing a complex problem into subproblems, why is it important that subproblem solutions can be combined without unintended interaction?

How programs Solve Problems Hard
A. Subproblems must share global variables to communicate correctly
B. Independent, composable subproblems prevent one module's side effects from corrupting another's result
C. Combining subproblems automatically improves time complexity to
D. Decomposition removes the need to verify the combined result