Difficulty: Easy
Correct Answer: Tab1 method 123 Tabl method Tab2 method
Explanation:
Introduction / Context:
This item checks understanding of static vs instance method calls and overload resolution, along with the exact order of outputs as control flows across fun1, fun2(), and fun2(int). The answer options use abbreviated labels ("Tab1"/"Tab2").
Given Data / Assumptions:
Concept / Approach:
Follow the sequence: a static call, then an overload that prints and invokes the parameterless overload, which in turn invokes the static method and prints again. Keep line order exact.
Step-by-Step Solution:
Verification / Alternative check:
Replace WriteLine calls with numbered markers to confirm the order: 1 (Tab1), 2 (123), 3 (Tab1), 4 (Tab2).
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting that fun2(int) delegates to fun2(), which again calls fun1() before writing “Tab2 method”.
Final Answer:
Tab1 method → 123 → Tab1 method → Tab2 method
Discussion & Comments