Exit Model Exam II
Which of the following is not a feature of structured programming?
A) Sequence
B) Selection
C) Recursion
D) Iteration
What is the purpose of a compiler in programming?
A) Execute the program line by line
B) Convert source code into machine code
C) Store program data
D) Detect logical errors
What will the following Java code output “[Link](10/0);”?
A) 0
B) Infinity
C) Compilation error
D) Exception at runtime
Which sorting algorithm has the best worst-case time complexity?
A) Bubble Sort
B) Selection Sort
C) Merge Sort
D) Insertion Sort
What is the purpose of the break statement in a loop?
A) Ends the current iteration and proceeds to the next
Exit Model Exam II
B) Exits the loop entirely
C) Skips remaining conditions in an if block
D) Exits the program
In memory management, what is a 'dangling pointer'?
A) A pointer that points to deallocated memory
B) A pointer to a null value
C) A pointer not initialized
D) A pointer that never changes
Which of the following is true about recursion?
A) It always uses less memory than iteration
B) Every recursive function must have a base case
C) Recursive functions never use the call stack
D) Recursion is faster than iteration in all cases
What does the term “pass by reference” mean?
A) The function creates a new copy of the variable
B) The function cannot modify the original variable
C) The function works directly with the memory address of the argument
D) The function deletes the variable from memory
Which of the following is not a valid identifier in most programming languages?
A) _var123
B) 2nd_value
C) myValue
Exit Model Exam II
D) total_sum
Which of the following statements about variables in Python is true?
A) Variable types must be declared explicitly.
B) Variables are statically typeD)
C) Python uses dynamic typing.
D) A variable must be assigned before definition.
What will the output of the following Python code be, “a = [1, 2, 3]; b = a; [Link](4);
print(b)”?
A) [1, 2, 3]
B) [1, 2, 3, 4]
C) Error
D) None
Which of the following statements about AVL trees is true?
A) Every binary search tree is an AVL tree
B) AVL trees perform fewer rotations than Red-Black trees
C) The balance factor of every node in an AVL tree is either -1, 0, or +1
D) Insertion in an AVL tree always takes O(log n²) time
What is the main advantage of a hash table over a binary search tree (BST)?
A) Better worst-case performance
B) Faster average-case search and insert operations
C) Uses less memory
D) Always maintains a sorted order of elements
Exit Model Exam II
Which of the following algorithms is used to find the shortest path from a single source in a
graph with negative edge weights but no negative cycles?
A) Dijkstra's algorithm
B) Kruskal's algorithm
C) Bellman-Ford algorithm
D) Prim's algorithm
In which of the following scenarios would you prefer a doubly linked list over a singly linked list?
A) When memory usage is critical
B) When traversal is always forward
C) When you need to delete nodes from both ends in constant time
D) When insertion only happens at the head
Which of the following is not a valid application of a stack?
A) Expression evaluation
B) Undo operations in editors
C) Level-order traversal of a binary tree
D) Function call management in recursion
Which of the following sorting algorithms is NOT stable by default?
A) Merge Sort
B) Insertion Sort
C) Bubble Sort
D) Heap Sort
Exit Model Exam II
What is not a valid reason to use polymorphism in OOP?
A) To allow objects of different types to be treated uniformly
B) To reduce code duplication through dynamic method binding
C) To increase performance through static dispatch
D) To facilitate implementation of extensible systems
In Java, what happens if a subclass constructor does not explicitly call a superclass constructor?
A) The program will not compile
B) The subclass constructor calls super() implicitly
C) The JVM throws a runtime exception
D) The parent class is not initialized
Which of the following concepts allows multiple methods in the same class to have the same
name but different parameters?
A) Method overriding
B) Method hiding
C) Method overloading
D) Dynamic dispatch
Which of the following scenarios best illustrates encapsulation?
A) A subclass inherits a method and changes its implementation
B) A class keeps data private and exposes access through public methods
C) Two classes share variables through public fields
D) A class declares an abstract method with no body
Which of the following best describes the "Liskov Substitution Principle" in object-oriented
design?
Exit Model Exam II
A) A child class can override private methods of the parent class
B) Instances of a subclass should be replaceable with instances of the superclass without
affecting correctness
C) All subclasses must have the same methods as the parent class
D) A subclass must inherit only from one base class
Which HTTP method is considered idempotent and typically used for updating a resource?
A) GET
B) POST
C) PUT
D) PATCH
What does the following JavaScript code output, “[Link]([] + []);”?
A) undefined
B) []
C) "" (empty string)
D) object
What is the default HTTP port used by HTTPS?
A) 80
B) 21
C) 22
D) 443
In JavaScript, what is the output of the following “[Link](typeof null);”?
A) "object"
Exit Model Exam II
B) "null"
C) "undefined"
D) "number"
What is the main purpose of the viewport meta tag in HTML?
A) To load CSS files
B) To define page color scheme
C) To set the visible area for responsive design
D) To define search engine metadata
What is the main security risk of using innerHTML to insert user-generated content into a
webpage?
A) Poor performance
B) Cross-site scripting (XSS)
C) Memory leaks
D) Browser incompatibility
In a Service Worker, which lifecycle event is responsible for caching static assets during
installation?
A) activate
B) install
C) fetch
D) updatefound
Which HTTP header is used to allow cross-origin requests from a specific domain?
A) Access-Control-Allow-Origin
B) Content-Type
Exit Model Exam II
C) Authorization
D) X-Requested-With
What is a key benefit of using a virtual DOM in libraries like React?
A) Direct manipulation of the real DOM
B) Eliminates the need for HTML
C) Improves performance by minimizing actual DOM updates
D) Supports server-side rendering automatically
In Android development, which of the following is the correct order of lifecycle methods for an
Activity when the app is brought to the foreground?
A) onCreate(), onStart(), onResume()
B) onPause(), onStop(), onStart()
C) onStop(), onPause(), onResume()
D) onResume(), onStart(), onCreate()
What is the purpose of the Manifest file in an Android application?
A) To define the user interface layout
B) To list all the dependencies for the app
C) To declare permissions and activities of the app
D) To handle the app’s HTTP network requests
In iOS development, what is the purpose of the AppDelegate class?
A) To manage user interface layouts
B) To handle app state transitions and background tasks
C) To manage network calls
Exit Model Exam II
D) To manage persistent storage (e.g., CoreData)
In Android development, what is the purpose of the RecyclerView widget?
A) To display simple, static lists
B) To display a list of items in a scrolling view with dynamic content
C) To animate transitions between different screens
D) To manage background tasks and services
What is the primary role of the ContentProvider class in Android?
A) To access system settings
B) To handle background processes
C) To manage access to shared data between applications
D) To create user interface elements dynamically
In the context of database normalization, what is the main objective of Boyce-Codd Normal
Form (BCNF)?
A) To eliminate partial dependencies
B) To ensure that every determinant is a candidate key
C) To remove transitive dependencies
D) To convert all relations to 1NF
Which of the following types of joins will return all rows from the left table and matching rows
from the right table, and return NULL for the non-matching rows in the right table?
A) Inner Join
B) Left Join (Left Outer Join)
C) Right Join (Right Outer Join)
D) Full Join (Full Outer Join)
Exit Model Exam II
What is the purpose of indexing in a database?
A) To allow quicker retrieval of data by creating a data structure that points to rows in a table
B) To enforce referential integrity
C) To ensure that the data remains consistent across multiple tables
D) To sort the data stored in the database
Which of the following is not a valid SQL data type?
A) VARCHAR
B) TEXT
C) LONGTEXT
D) BIGINT
E) STRING
In a many-to-many relationship between two tables, what is usually required to resolve the
relationship?
A) A foreign key in one of the tables
B) An additional table called a junction table
C) A unique constraint on the relationship
D) A self-referencing foreign key
Which of the following is the primary purpose of denormalization in database design?
A) To reduce redundancy by splitting large tables
B) To improve query performance by introducing redundancy
C) To ensure data consistency across multiple tables
D) To enforce referential integrity constraints
Exit Model Exam II
Which of the following scheduling algorithms can result in starvation of certain processes?
A) Round Robin
B) First-Come, First-Served (FCFS)
C) Shortest Job First (SJF)
D) Priority Scheduling
What does the virtual memory system allow an operating system to do?
A) Keep all processes in the main memory at once
B) Use disk space as an extension of main memory
C) Reduce the number of context switches
D) Allocate fixed-sized memory blocks for processes
Which of the following memory management techniques is used to avoid fragmentation in
memory allocation?
A) Paging
B) Segmentation
C) Contiguous allocation
D) Dynamic partitioning
What is the key difference between preemptive and non-preemptive scheduling?
A) Preemptive scheduling allows the OS to interrupt a process and assign CPU time to another
process, while non-preemptive scheduling does not.
B) Preemptive scheduling does not allow context switching, while non-preemptive does.
C) Preemptive scheduling uses a priority queue, while non-preemptive uses FCFS.
D) Non-preemptive scheduling uses more CPU resources than preemptive scheduling.
Exit Model Exam II
What is a deadlock in the context of an operating system?
A) A process spends more time waiting for resources than running
B) Two or more processes are unable to proceed because each is waiting for resources held by
the other
C) A process is terminated unexpectedly due to a system failure
D) The system is overloaded and cannot allocate CPU time to any processes
Which of the following is true regarding thrashing in an operating system?
A) Thrashing is a process where CPU usage is reduced to near zero.
B) Thrashing occurs when the system spends too much time swapping data between main
memory and disk.
C) Thrashing improves system performance by utilizing disk I/O efficiently.
D) Thrashing is the result of too many processes running simultaneously.
In Agile software development, what does the term "velocity" refer to?
A) The speed at which code is written
B) The rate at which the development team resolves bugs
C) The amount of work completed in a sprint, typically measured in story points
D) The speed of the system after the software is deployed
What is the primary goal of refactoring in software engineering?
A) To add new features to the software
B) To improve the system’s performance by optimizing code
C) To clean and improve the internal structure of the code without changing its external
behavior
D) To reduce the number of lines of code
Exit Model Exam II
Which of the following is not a characteristic of good software requirements?
A) Unambiguous
B) Testable
C) Subject to frequent changes
D) Clear and concise
In Extreme Programming (XP), which of the following practices is emphasized?
A) Documentation-driven development
B) Continuous integration and frequent releases of software
C) Strictly adhering to the original software requirements
D) Extensive upfront design before coding
Which of the following is the most important goal of software configuration management?
A) To optimize the memory usage of the software
B) To track changes in software artifacts and ensure consistency across versions
C) To reduce the cost of hardware required to run the software
D) To ensure that the software runs efficiently on different platforms
What is the primary purpose of software prototyping in software engineering?
A) To fix bugs in the software before it is released
B) To create a working model of the system to gather feedback from users early in the
development process
C) To implement the final version of the software
D) To analyze and test the database design
In requirements elicitation, which of the following techniques involves interacting directly with
end users to gather their needs and expectations?
Exit Model Exam II
A) Brainstorming
B) Focus groups
C) Surveys
D) Interviews
Which of the following is not a commonly used technique for requirements validation?
A) Prototyping
B) Reviews
C) Inspections
D) Use case analysis
What is the primary purpose of traceability in the context of requirements engineering?
A) To ensure that the system meets its functional and non-functional requirements
B) To track the relationships between different versions of the requirements
C) To map each requirement to its corresponding design, implementation, and testing activities
D) To automate the generation of documentation from the requirements
In requirement prioritization, which of the following techniques assigns a numerical value to
each requirement based on its importance and urgency?
A) MoSCoW method
B) Pairwise comparison
C) Kano model
D) Numeric ranking
Which of the following is not a typical challenge in the requirements engineering process?
A) Ambiguity in the requirements
Exit Model Exam II
B) Conflicting requirements from different stakeholders
C) Over-specification of requirements
D) Efficient translation of requirements into code
What is the primary advantage of using the Microservices Architecture?
A) It provides a monolithic design, which simplifies deployment and testing.
B) It allows for fine-grained scalability, enabling each service to scale independently.
C) It requires minimal communication between services, making the system faster.
D) It relies on a single database that all services share.
What is the primary objective of Separation of Concerns (SoC) in software architecture?
A) To limit the number of components in a system
B) To organize the system into distinct components, each responsible for a specific aspect of the
system’s functionality
C) To avoid unnecessary communication between components
D) To maximize the number of interactions between components
Which architectural pattern is particularly suited for applications where frequent real-time
communication is required, such as online multiplayer games or messaging apps?
A) Layered Architecture
B) Client-Server Architecture
C) Event-Driven Architecture
D) Publish-Subscribe Architecture
In a Service-Oriented Architecture (SOA), what is typically used to enable communication
between services?
A) A shared memory space for all services
Exit Model Exam II
B) A centralized server to handle all communication
C) A message bus or communication protocol like HTTP, SOAP, or REST
D) Direct, peer-to-peer communication between services
Which of the following qualities is most likely to be impacted by poor architectural decisions,
leading to reduced system performance?
A) Modularity
B) Scalability
C) Security
D) Maintainability
In the Earned Value Management (EVM) method, what does the term Cost Performance Index
(CPI) represent?
A) The ratio of earned value to planned value
B) The ratio of earned value to actual cost, indicating the cost efficiency of the project
C) The ratio of planned value to actual cost, showing whether the project is ahead of schedule
D) The ratio of actual cost to earned value, showing how much cost has been incurred to
achieve the work completed
Which of the following is not typically part of the project initiation phase in software project
management?
A) Defining the project scope
B) Developing a detailed project schedule
C) Identifying stakeholders
D) Establishing project goals and objectives
In the Agile Scrum methodology, what is the purpose of the Product Backlog?
Exit Model Exam II
A) To define the project’s final delivery date
B) To track the progress of the sprint
C) To list all the features, requirements, and work items that are needed for the product
D) To assign tasks to individual team members
In the context of project quality management, what is the purpose of quality assurance (QA)
activities?
A) To monitor and control the project's schedule and costs
B) To perform inspections and tests on the software products to detect defects
C) To ensure that the project processes and activities are continuously improved to meet quality
standards
D) To create detailed documentation for project deliverables
Which of the following is the primary goal of scope management in a software project?
A) To track project performance using earned value management metrics
B) To ensure that only the required work necessary for project completion is included,
preventing scope creep
C) To define and approve the software design and architecture
D) To manage changes in the software development team and their roles
Which of the following is a characteristic of automated testing compared to manual testing?
A) It is more flexible in terms of detecting unexpected issues during exploratory testing
B) It is less time-consuming for repetitive tasks and regression tests
C) It does not require maintenance after the initial setup
D) It is more effective for user interface (UI) testing
Exit Model Exam II
Which of the following test techniques is used to verify that the system behaves as expected
under extreme conditions, such as maximum capacity or high load?
A) Stress testing
B) Usability testing
C) Unit testing
D) Integration testing
In the context of test case design, which of the following types of tests focuses on verifying the
correctness of individual functions or components of the software?
A) Unit testing
B) Integration testing
C) System testing
D) Acceptance testing
In Equivalence Partitioning, a range of valid input values (e.g., ages between 18 and 60) is
considered to have how many test cases?
A) One test case for each value in the range
B) Two test cases: one for valid and one for invalid values
C) One test case to represent all valid inputs and another for invalid inputs
D) Multiple test cases for different combinations of valid and invalid values
If a function accepts an integer input between 1 and 100, which of the following inputs would
be considered valid boundary values for Boundary Value Analysis?
A) 1, 50, 100
B) 0, 1, 100, 101
C) 2, 3, 99, 100
D) 1, 25, 75, 100
Exit Model Exam II
Which of the following best defines software maintenance?
A) The process of creating new features and functionality for the software
B) The process of fixing bugs in the initial release of the software
C) The process of modifying software after delivery to correct faults, improve performance, or
adapt it to a changed environment
D) The process of upgrading hardware to support the software system
Adaptive maintenance involves making changes to the software system for which of the
following reasons?
A) To fix defects in the software
B) To enhance the system’s functionality
C) To accommodate changes in the software environment or hardware
D) To improve the software's performance
Which of the following is the primary challenge faced during software maintenance?
A) Managing hardware dependencies
B) Dealing with changing customer requirements and evolving environments
C) Minimizing the size of the software codebase
D) Implementing new features without testing existing functionality
In legacy software systems, what is a common approach for maintaining them while adding new
features?
A) Completely rewriting the software to improve efficiency
B) Refactoring the existing code to improve its structure without changing its behavior
C) Adding new features without altering any of the existing code
D) Migrating the system to a new platform without testing the existing functionality
Exit Model Exam II
Which of the following is a major risk in software maintenance?
A) Lack of proper version control
B) Software's functionality decreases over time due to incomplete testing
C) Lack of user documentation
D) Software code becomes outdated and unmodifiable over time without rework
Which of the following protocols operates at the Transport layer of the OSI model?
A) IP (Internet Protocol)
B) TCP (Transmission Control Protocol)
C) HTTP (Hypertext Transfer Protocol)
D) Ethernet
In a classful IP addressing scheme, how many classes are there, and what is the range of
addresses for Class C?
A) 3 classes; [Link] to [Link]
B) 5 classes; [Link] to [Link]
C) 4 classes; [Link] to [Link]
D) 3 classes; [Link] to [Link]
What does the ARP (Address Resolution Protocol) do in a network?
A) It resolves IP addresses to domain names
B) It maps MAC addresses to IP addresses
C) It authenticates users on the network
D) It routes data between subnets
Exit Model Exam II
Which of the following describes the function of the Data Link layer in the OSI model?
A) To route data packets between different networks
B) To provide end-to-end communication between hosts
C) To create a reliable link between two directly connected nodes by framing and error
detection
D) To establish communication between applications running on different systems
Which of the following is a feature of the TCP/IP protocol suite?
A) It is a connectionless protocol that provides reliable delivery of data packets
B) It operates at the Data Link and Physical layers of the OSI model
C) It guarantees end-to-end reliability and error correction
D) It does not support addressing or routing functionality
Which of the following is the primary purpose of a subnet mask in IPv4 addressing?
A) To specify the default gateway for network traffic
B) To distinguish the network and host portions of an IP address
C) To allocate IP addresses to devices within a subnet
D) To encrypt data transmitted over a network
Which of the following best describes a zero-day vulnerability?
A) A vulnerability that has been publicly disclosed but not yet patched
B) A security flaw that can only be exploited by insiders within an organization
C) A vulnerability that has been patched but still exists in older versions of software
D) A flaw in software that has been discovered and is actively being exploited before a patch is
available
Which of the following is a defense mechanism against buffer overflow attacks?
Exit Model Exam II
A) Stack canaries
B) Virtual machines
C) Web Application Firewalls (WAFs)
D) Anti-virus software
What is the primary purpose of input validation in securing a software application?
A) To ensure that the software can handle large amounts of data
B) To prevent unauthorized users from accessing the system
C) To ensure that user input is properly checked for malicious data that could exploit
vulnerabilities
D) To ensure that the software functions correctly in different environments
Which of the following is a common vulnerability that allows attackers to execute arbitrary code
in a system?
A) Cross-site request forgery (CSRF)
B) Cross-site scripting (XSS)
C) Code injection
D) Man-in-the-middle attacks
Which of the following is not a commonly used method for authentication in securing software?
A) Multi-factor authentication (MFA)
B) Biometric authentication
C) Time-based one-time passwords (TOTP)
D) Data obfuscation
Which of the following search algorithms is complete and optimal, assuming a constant step
cost?
Exit Model Exam II
A) Depth-First Search
B) Breadth-First Search
C) Greedy Best-First Search
D) Hill Climbing
In first-order predicate logic, what does the formula ∀x ∃y Loves(x, y) mean?
A) Everyone is loved by someone.
B) There exists someone who loves everyone.
C) Everyone loves someone.
D) Someone loves everyone.
What is the main limitation of using propositional logic in AI systems?
A) It cannot represent probabilistic knowledge
B) It lacks expressive power for handling complex relationships and quantifiers
C) It is slower than predicate logic in inference
D) It uses too much memory
What is the curse of dimensionality in AI and machine learning?
A) Models become underfit due to too few dimensions
B) Algorithms perform better as more features are added
C) The feature space becomes sparse as dimensions increase, degrading model performance
D) It refers to the inability to visualize high-dimensional data
Which AI approach is based on modeling human cognitive processes?
A) Connectionism
B) Symbolic AI
Exit Model Exam II
C) Evolutionary computation
D) Strong AI
In machine learning, which of the following is not a part of supervised learning?
A) Decision Trees
B) Support Vector Machines
C) K-Means Clustering
D) Naïve Bayes Classifier
Which of the following is most likely to cause a high bias in a machine learning model?
A) Overfitting the training data
B) Using a model with too few parameters
C) High variance in input data
D) Having too much training data
In the context of linear regression, which of the following techniques is used to prevent
overfitting by penalizing large coefficients?
A) Principal Component Analysis
B) Gradient Descent
C) L2 Regularization (Ridge Regression)
D) Cross-validation
Which of the following metrics is most appropriate for imbalanced classification problems?
A) Accuracy
B) Mean Absolute Error
C) F1 Score
Exit Model Exam II
D) R-squared
In Support Vector Machines (SVMs), what is the role of the kernel trick?
A) To convert linear SVMs into decision trees
B) To optimize the margin between classes
C) To transform data into higher-dimensional space for linear separation
D) To reduce the training time of SVMs
ANSWER: C