1. What is recursion in programming?
(A) A variable assignment
(B) A loop
(C) A function calling itself
(D) A type of error
2. What is the main advantage of recursion?
(A) Faster execution than loops always
(B) Uses less memory than loops
(C) Avoids errors
(D) Simplifies code for problems that have repetitive sub-problems
3. What is an algorithm?
(A) A function
(B) A type of loop
(C) A step-by-step procedure to solve a problem
(D) A variable type
4. What is a data structure?
(A) A variable
(B) A loop structure
(C) A conditional statement
(D) A way to organize and store data efficiently
5. Which of the following is an example of a linear data structure?
(A) Graph
(B) Tree
(C) Array
(D) Hash Table
6. Which of the following is an example of a non-linear data structure?
(A) Stack
(B) Tree
(C) Queue
(D) List
7. What is a pointer?
(A) A loop counter
(B) A type of function
(C) A variable that stores the memory address of another variable
(D) A conditional statement
8. What is multithreading?
(A) Handling exceptions
(B) Using multiple loops
(C) Creating multiple functions
(D) Running multiple threads simultaneously within a program
9. What is concurrency in programming?
(A) Executing multiple tasks at the same time
(B) Creating multiple variables
(C) Using multiple loops
(D) Handling exceptions
10. What is parallelism?
(A) Running one operation after another
(B) Using multiple loops
(C) Performing multiple operations exactly at the same time
(D) Creating multiple functions
11. What is a deadlock?
(A) A type of loop
(B) A situation where two or more processes are waiting indefinitely for resources
(C) A syntax error
(D) A runtime exception
12. What is a race condition?
(A) A syntax error
(B) A type of loop
(C) When the output of a program depends on the timing of multiple threads
(D) A runtime exception
13. What is a design pattern?
(A) A reusable solution to a common programming problem
(B) A type of variable
(C) A loop structure
(D) A function
14. What is software abstraction?
(A) Using variables
(B) Storing data in arrays
(C) Creating loops
(D) Hiding unnecessary details and showing only essential features
15. What is modular programming?
(A) Dividing a program into separate modules that can be developed and tested independently
(B) Using loops
(C) Creating multiple variables
(D) Handling exceptions
16. What is a callback function?
(A) A syntax error
(B) A type of loop
(C) A variable assignment
(D) A function passed as an argument to another function to be executed later
17. What is lazy evaluation?
(A) Executing all operations immediately
(B) Delaying computation until the result is needed
(C) Using loops inefficiently
(D) Allocating memory statically
18. What is memoization?
(A) Handling exceptions
(B) Using multiple loops
(C) Storing results of expensive function calls to reuse them later
(D) Declaring variables
19. What is a singleton pattern?
(A) A design pattern that restricts a class to a single instance
(B) A type of loop
(C) A variable
(D) A function
20. What is the main goal of advanced programming concepts?
(A) To store variables
(B) To create loops
(C) To write efficient, reusable, and maintainable programs
(D) To print output