Which of the following best describes SQL?
A A programming language for web development B A language for managing and querying databases C A markup language for creating web pages D A platform for cloud computing
SQL (Structured Query Language) is used for managing and querying relational databases
In Java, what does 'final' keyword do when applied to a variable?
A It makes the variable private B It prevents the variable from being modified C It makes the variable static D It initializes the variable to zero
'final' keyword makes a variable immutable - once assigned, it cannot be changed
What is the output of: print(10 // 3) in Python?
A 3 B 3.33 C 4 D Error
The '//' operator performs floor division, which returns 3 (the integer part of 3 10 )
Which data structure uses LIFO (Last-In-First-Out)?
A Queue B Stack C Array D Linked List
A Stack uses LIFO principle where the last element added is the first one to be removed
What is the purpose of an index in a database?
A To store backup data B To speed up query retrieval C To encrypt sensitive data D To remove duplicate records
An index is a database structure that improves the speed of data retrieval by creating a quick lookup mechanism
Which protocol is used for secure web communication?
A HTTP B FTP C HTTPS D SMTP
HTTPS is HTTP with encryption/security using SSL/TLS protocols for secure communication
What is the main purpose of version control systems like Git?
A To compress files B To track changes in code and enable collaboration C To encrypt code D To execute code
Version control systems track code changes over time and facilitate team collaboration by managing different versions
What is polymorphism in OOP?
A Using multiple classes in one program B The ability of objects to take multiple forms C Creating multiple instances of the same class D Inheriting from multiple parent classes
Polymorphism allows objects to take multiple forms - same method name can behave differently in different contexts (method overriding, overloading)
Which of the following is NOT a characteristic of Cloud Computing?
A On-demand self-service B Broad network access C Physical hardware always on-premises D Rapid elasticity
Cloud computing is characterized by remote resources, not physical hardware on-premises. All others are cloud characteristics
What does API stand for?
A Application Programming Instruction B Application Programming Interface C Advanced Programming Integration D Application Process Integration
API stands for Application Programming Interface - a set of rules that allows different applications to communicate
In machine learning, what is the purpose of cross-validation?
A To increase model accuracy by 100% B To assess how well a model generalizes to unseen data C To reduce the size of the dataset D To remove outliers from data
Cross-validation divides data into multiple subsets to evaluate model performance and check if it generalizes well
What is the primary difference between ArrayList and LinkedList in Java?
A ArrayList is faster for random access; LinkedList is faster for insertion/deletion B LinkedList is faster for random access; ArrayList is faster for insertion/deletion C They have identical performance D ArrayList can only store integers
ArrayList uses arrays (O(1) random access) while LinkedList uses nodes (O(n) random access but O(1) insertion/deletion at ends)
What is normalization in database design?
A Converting data to uppercase B Reducing data redundancy and improving data integrity C Making all tables have the same structure D Splitting one database into multiple databases
Normalization is the process of organizing data to reduce redundancy and dependency, improving database integrity
What is the main purpose of agile methodology in software development?
A To eliminate all bugs before release B To deliver software incrementally with continuous feedback and adaptation C To reduce the number of developers needed D To eliminate the need for testing
Agile methodology emphasizes iterative development, continuous feedback, and adaptability rather than fixed lengthy development cycles
What is an exception in programming?
A A feature that all programs must have B An error that occurs during program execution that disrupts normal flow C A special type of variable D A comment in the code
An exception is an event that occurs during program execution that disrupts the normal flow, requiring special handling
If a string in Python is assigned as s = 'hello', what is the output of s[1:4]?
A 'ell' B 'llo' C 'hell' D 'ello'
String slicing s[1:4] returns characters from index 1 to 3 (4 is exclusive): 'e', 'l', 'l' = 'ell'
What is the primary advantage of using NoSQL databases over relational databases?
A They always provide better performance B They can handle unstructured data and scale horizontally more easily C They don't require any data validation D They are cheaper to maintain
NoSQL databases are designed for flexible schemas, unstructured data, and horizontal scalability across distributed systems
In the context of cybersecurity, what is a firewall?
A Software that deletes viruses B A security system that monitors and controls incoming and outgoing network traffic C A type of encryption algorithm D A backup system for data
A firewall is a security barrier that filters network traffic based on predetermined rules to protect systems from unauthorized access
What is the value of log₂(8)?
A 2 B 3 C 4 D 8
log₂(8) means 2^? = 8. Since 2³ = 8, the answer is 3
If the probability of an event A is 0.4 and event B is 0.3, what is the probability of both A and B occurring (assuming independence)?
A 0.7 B 0.12 C 0.1 D 0.35
For independent events: P(A and B) = P(A) × P(B) = 0.4 × 0.3 = 0.12