Ultimate Exam
**Question 1. Which of the following data types typically occupies 4 bytes of memory in most modern
programming languages?**
A) short
B) int
C) long
D) byte
Answer: B
Explanation: An `int` is commonly implemented as a 32-bit (4-byte) signed integer on most platforms.
**Question 2. In a stack-based memory model, which region is used for storing local variables and
function call information?**
A) Heap
B) Data segment
C) Stack
D) Code segment
Answer: C
Explanation: The stack holds local variables, return addresses, and other call-frame data for each
function invocation.
**Question 3. Which operator tests whether two values are not equal in C-style languages?**
A) =
B) <>
C) !=
D) ==
Answer: C
Explanation: `!=` returns true when the operands differ; `==` tests for equality.
**Question 4. A flowchart uses a diamond shape to represent which construct?**
,MTA Software Development Fundamentals
Ultimate Exam
A) Process step
B) Decision point
C) Input/Output
D) Loop start
Answer: B
Explanation: Diamonds denote decisions or conditional branches in flowcharts.
**Question 5. Which loop guarantees that its body executes at least once before the condition is
evaluated?**
A) for
B) while
C) do-while
D) foreach
Answer: C
Explanation: A `do-while` loop checks its condition after executing the loop body, ensuring one
execution.
**Question 6. What term describes a function that calls itself directly or indirectly?**
A) Iteration
B) Recursion
C) Overloading
D) Delegation
Answer: B
Explanation: Recursion is the technique where a method invokes itself to solve a problem.
**Question 7. In structured exception handling, which block always executes regardless of whether an
exception occurs?**
A) try
,MTA Software Development Fundamentals
Ultimate Exam
B) catch
C) finally
D) throw
Answer: C
Explanation: The `finally` block runs after the `try`/`catch` sequence, even if no exception is thrown.
**Question 8. When an unhandled exception propagates, which data structure records the sequence of
method calls that led to the error?**
A) Heap
B) Call stack
C) Queue
D) Register file
Answer: B
Explanation: The call stack maintains frames for each active method; its contents form the stack trace.
**Question 9. Which access modifier allows a class member to be accessed only within its own class and
derived classes in the same assembly?**
A) public
B) private
C) protected internal
D) internal
Answer: C
Explanation: `protected internal` grants access to derived types and any code in the same assembly.
**Question 10. In OOP, which relationship best represents “a Car is a Vehicle”?**
A) Association
B) Aggregation
C) Composition
, MTA Software Development Fundamentals
Ultimate Exam
D) Inheritance
Answer: D
Explanation: “is-a” relationships are modeled using inheritance; Car derives from Vehicle.
**Question 11. What keyword is used in C# to hide a base-class member with a new implementation in
a derived class?**
A) override
B) new
C) virtual
D) abstract
Answer: B
Explanation: The `new` keyword hides the base member, creating a separate member in the derived
class.
**Question 12. Which principle of OOP encourages keeping data fields private and exposing them
through methods?**
A) Polymorphism
B) Encapsulation
C) Inheritance
D) Abstraction
Answer: B
Explanation: Encapsulation restricts direct access to internal state, protecting integrity.
**Question 13. Which software development phase focuses on converting user requirements into
detailed design diagrams and specifications?**
A) Planning
B) Designing
C) Testing
D) Maintenance