#1
What is the basic purpose of conditional statements in programming?
To repeat a block of code
To make decisions and execute code based on conditions
To display information to the user
To define functions
#2
Which data type is used to store whole numbers in programming?
#3
What is the purpose of the 'const' keyword in programming?
To declare a constant variable
To create a loop
To define a function
To handle exceptions
#4
What is the role of a constructor in object-oriented programming?
To destroy objects
To initialize objects
To define constants
To create loops
#5
What does the term 'algorithm' refer to in the context of programming?
A programming language
A step-by-step procedure or formula for solving a problem
A type of variable
A loop structure
#6
In programming, what is the purpose of the 'return' statement in a function?
To print a value to the console
To exit the program
To return a value from the function
To start a loop
#7
In object-oriented programming, what is encapsulation?
A way to create instances of a class
A process of hiding the implementation details of an object and exposing only the necessary functionalities
A mechanism for organizing and storing data
A type of loop structure
#8
What is the purpose of the 'try', 'catch', and 'finally' blocks in exception handling?
To define variables
To declare functions
To handle errors and exceptions
To create loops
#9
What is the difference between procedural and object-oriented programming?
The use of variables
The way functions are defined
The organization of code and data into objects
The type of loops used
#10
What is a stack in the context of data structures?
A linear data structure with a Last In, First Out (LIFO) order
A sorting algorithm
A type of loop
A conditional statement
#11
In programming, what does the term 'scope' refer to?
The visibility and accessibility of variables
The order of execution of statements
The type of loop used
The size of data types
#12
What is the primary function of a pointer in programming?
To store text data
To store and manage arrays
To store memory addresses
To execute conditional statements
#13
What is the significance of the 'this' keyword in object-oriented programming?
Refers to the previous object in the chain
Refers to the current instance of the object
Denotes a static variable
Used to define constants
#14
What is a design pattern in software development?
A common solution to a recurring problem in a specific context
A data type in programming
A type of loop
An exception handling mechanism
#15
What is the purpose of the 'super' keyword in object-oriented programming?
Refers to a subclass
Refers to the superclass or parent class
Used to break out of a loop
Denotes a static method
#16
What is polymorphism in object-oriented programming?
A mechanism for handling errors
A way to declare constants
The ability of an object to take on multiple forms
A loop structure
#17
What is the purpose of the 'extern' keyword in C programming?
To declare a variable as a constant
To link external libraries
To define a function
To create a loop
#18
What is the Big-O notation used for in algorithms?
To denote object-oriented concepts
To analyze and describe the efficiency of an algorithm
To define variables
To handle exceptions