Advanced Programming Concepts MCQs

Topic-wise practice questions for Programming (C++ / Java / Python). Test your knowledge, check solutions on demand, and pace your preparation.

Zero-leak answer engine • Rate-limited explanations
Practice in Timed Mode
Q1medium
You want to write a function that can accept any List, but you want to ensure the items in the list are at least a type of Animal (e.g., Dog or Cat). Which concept should you use?
Q2easy
What is Introspection in the context of advanced programming?
Q3medium
(Code-Tracing / Java) In Java, what is the result of Type Erasure on a List<Integer> after the code is compiled into bytecode?
Q4medium
You are using a modern Web Framework that automatically creates a database table based on your class name and variable names. Which advanced concept is the framework using to "read" your code?
Q5easy
What is the primary advantage of using Generics over using the Object class to store items in a collection?
Q6easy
What is a Closure in programming?
Q7medium
Trace the result of this Higher-Order logic:

list = [1, 2, 3, 4]
result = list.filter(x -> x > 2).map(x -> x * 2)
print(result)
Q8medium
A developer adds @Deprecated to a method in Java or [Obsolete] in C#. What is the purpose of this metadata?
Q9medium
Look at this C++ Template snippet:

template <typename T>
T add(T a, T b) { return a + b; }
print(add(5, 10));
print(add(2.5, 1.5));
What is the output?
Q10easy
What is the main purpose of Fluent Interfaces (Method Chaining), often seen in advanced libraries?