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 set of instructions that tells a computer what to do
B. A type of computer memory
C. A brand of processor
D. A physical part of the computer

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

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

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

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

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

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

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

What is computer Program Easy
A. A monitor
B. Hardware
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. Operating system
C. Web browser
D. Spreadsheet

7 Which statement about hardware and software is correct?

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

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

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

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

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

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

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

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. Spreadsheet
C. Flowchart
D. Database

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

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

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

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

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

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

15 An algorithm can best be described as:

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

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

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

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

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

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

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

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

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

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

How programs Solve Problems Easy
A. Write random code
B. Break it into smaller subproblems
C. Remove all input steps
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 translated into machine code
B. The instructions must be converted into a spreadsheet
C. The instructions must be sent to the monitor first
D. The instructions must be stored on a printer

22 Which statement best distinguishes a program from an algorithm?

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

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 client-server concept
B. The stored-program concept
C. The open-source concept
D. The plug-and-play 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. A game played for entertainment
C. A word processor used to type letters
D. An operating system that manages memory and devices

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 .py is faster because it is already compiled
B. The .exe is source code, while the .py is machine code
C. The .exe is written in English, while the .py is not
D. The .exe already contains machine code, while the .py needs an interpreter

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 operating system through its device drivers
B. The power supply unit
C. The monitor's display controller
D. The application software alone

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 rewrites the disk's firmware itself
B. It converts itself into a device driver
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. Hardware → Application → Operating System
C. Application → Hardware → Operating System
D. Application → Operating System → Hardware

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. A spreadsheet that stores the printer's settings
B. A device driver that lets the OS communicate with the printer
C. An antivirus that scans the printer for errors
D. A compiler that turns print jobs into source code

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

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

31 Why is software necessary for hardware to be useful?

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

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 flowchart
B. A database schema
C. A spreadsheet macro
D. A firewall rule

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

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

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

Planning a Computer Program Medium
A. It runs faster than the final program
B. It replaces the need for testing the program
C. It automatically compiles into machine code
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. Define the problem → design the solution → code → test
B. Test → code → design → define the problem
C. Code → define the problem → test → design
D. Design → test → define the problem → code

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. Modular design (decomposition)
B. Hardware layering
C. Direct compilation
D. Random coding

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 mark the start or end of the process
C. To make a decision
D. To perform a calculation

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 constant declaration
B. A loop (iteration)
C. A sequence
D. A single assignment

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. Declaration
B. Selection (if-else)
C. Iteration
D. Sequence

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 physical storage of the program
D. The raw data entered by the user

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 execute only when triggered by an external mechanical switch
C. Instructions are limited to arithmetic and cannot perform branching
D. Instructions reside in the same addressable memory as data and can be modified at runtime

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

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

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 identical in execution speed because the logic is the same
B. They are different programs because interpreted code is not a real program
C. They are the same logical program; only the translation-and-execution strategy differs
D. They are different programs because only compiled code counts as instructions

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 is not executable without an interpreter and therefore avoided
B. It runs slower than high-level code, discouraging its use
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 → hardware controller → OS system call → device driver
B. OS system call → application → hardware controller → device driver
C. Application → OS system call → device driver → hardware controller
D. Application → device driver → OS system call → hardware controller

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. A translator (compiler/interpreter) plus an OS to load and manage execution
B. Only an OS, since it can execute high-level code directly
C. Only a compiler, since the OS is optional for any program
D. Only firmware, which interprets high-level code natively

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. Interrupts are slower because they bypass the device driver
B. Interrupts require the CPU to check devices continuously, unlike polling
C. Polling cannot detect device status, so data is lost
D. Polling wastes CPU cycles repeatedly checking device status, while interrupts notify only when ready

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. Neither can access hardware; only firmware can
C. Application software runs in privileged mode; system software is restricted to user mode
D. Both run in privileged mode with identical direct hardware access

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. Source code cannot be compiled twice for different machines
B. High-level languages are architecture-specific and cannot be reused
C. The operating system refuses to load any external files
D. The machine instruction set differs, so the compiled binary is not understood by the other CPU

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

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

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. Pseudocode is language-specific while flowcharts are language-independent
B. Flowcharts visualize control flow well but scale poorly; pseudocode scales to complex logic but hides visual flow
C. Pseudocode can only represent loops, while flowcharts represent everything else
D. Flowcharts are executable while pseudocode must be compiled

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. Hard-code an assumed constant to simplify the algorithm
C. Remove the calculation because runtime values cannot be planned
D. Skip the calculation until the program is running

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 removes the need for testing since modules are independent
C. Each module isolates a subproblem, so changes and testing can be localized without affecting others
D. It guarantees the program runs faster on all hardware

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. Testing becomes unnecessary because logic is complete
B. The program will not compile at all
C. Coders make inconsistent assumptions, producing defects that surface only for boundary inputs
D. The pseudocode becomes executable without translation

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 works for any list of any values
C. Initializing to is faster on all hardware
D. Initializing to the first element avoids the need for a loop

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. A is permanently the better algorithm for all inputs
B. Asymptotic complexity describes scaling for large ; for small constant factors can make A faster
C. Big-O is wrong because B should always be faster
D. Complexity analysis is invalid for values below

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. Choosing a programming language for the solution
C. Testing outputs against expected results and refining the algorithm for missed cases
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. Recursion produces incorrect logic for large numbers
B. Iteration uses more memory but avoids computation errors
C. The compiler cannot translate recursive functions
D. Deep recursion consumes stack frames until the stack overflows, unlike the iterative loop

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 never executes because the condition is false initially
B. An infinite loop occurs because x never equals exactly when starting odd and stepping by
C. The loop terminates correctly for all starting values
D. The loop runs exactly once regardless of x

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. Decomposition removes the need to verify the combined result
B. Combining subproblems automatically improves time complexity to
C. Independent, composable subproblems prevent one module's side effects from corrupting another's result
D. Subproblems must share global variables to communicate correctly