2025 | Full-Length | Questions, Correct Answers, and Rationales
,1. Describe the main functional difference between 'while' loops and 'do while'
loops in programming.
The 'while' loop is faster than the 'do while' loop in execution.
The 'while' loop is used for iterating over arrays only.
The main functional difference is that a 'do while' loop guarantees at
least one execution of the loop body, while a 'while' loop may not
execute at all if the condition is false initially.
The 'do while' loop can only be used with integer data types.
Rationale:
A 'do while' loop executes the loop body first, then checks the condition,
ensuring at least one run. A 'while' loop checks the condition first, possibly
skipping execution entirely.
2. What is the definition of 'grammar' in the context of programming
languages?
The process of debugging code for errors.
The set of rules that define the structure of statements in a
programming language.
The collection of functions available in a programming language.
The method of writing comments in code.
Rationale:
In programming, grammar defines the syntax and structural rules determining
how code statements must be written and organized to be valid.
3. Describe the significance of object-oriented principles in programming
languages.
Object-oriented principles focus solely on data types and variables.
Object-oriented principles are only applicable in web development.
Object-oriented principles allow for encapsulation, inheritance, and
polymorphism, which enhance code reusability and organization.
Object-oriented principles eliminate the need for algorithms in
programming.
,Rationale:
OOP principles promote modular, reusable, and maintainable code by modeling
data and behavior into objects with clearly defined relationships.
4. If a software project skips the testing phase, what potential issues might
arise during deployment?
The software will require less maintenance after deployment.
The software will be completed faster without testing.
User satisfaction will automatically increase.
Undetected bugs and unmet requirements may lead to software
failures.
Rationale:
Testing ensures functional correctness and reliability. Skipping it often results in
bugs, crashes, or unmet user needs.
5. Which design process promotes teamwork and cross training, is easy to
manage, and delivers early work?
Waterfall
Agile
Rationale:
The Agile methodology emphasizes collaboration, adaptability, and iterative
delivery, producing working software in short cycles with frequent feedback.
6. If you modify the function to myNewFunction(integer Iy) z = y +
5, what would be the new parameter and its significance?
z, which is a constant value in the function.
5, which defines the return type of the function.
y, which is the output of the function.
Iy, which is used as an input for the calculation in the function.
, Rationale:
In this function definition, Iy is the input parameter. It is passed into the
function, used to calculate a result (z = y + 5).
7. Describe the significance of the argument passed to the function popcorn in
determining its output.
The argument is irrelevant to the function's output.
The argument is used for debugging purposes only.
The argument influences the calculation or logic within the function to
produce a specific result.
The argument only affects the function's execution time.
Rationale:
A function argument supplies data to the function, affecting its internal
computations and, therefore, its output.
8. What is the name of the operator type that produces a boolean value?
Relational operator
Boolean operator
Arithmetic operator
Assignment operator
Rationale:
Relational operators (e.g., ==, !=, >, <) compare values and return a boolean
(true or false) result.
9. What is the advantage of a high-level programming language rather than a
low-level programming language?
Easier to read, write, and maintain.