a 20-question quiz about computer science, with explanations after each question
-
1 Which of the following is NOT a type of software?
-
Operating system
-
Compiler
-
Router
Correct!Wrong!Explanation
A router is a hardware device used in networking, not software. Operating systems, compilers, and spreadsheets are all software applications.
-
-
2 What does the acronym "HTTP" stand for?
-
Hyper Text Transfer Protocol
-
High Transfer Text Protocol
-
Hyper Terminal Text Protocol
Correct!Wrong!Explanation
HTTP is the protocol used for transferring hypertext requests and information on the World Wide Web.
-
-
3 Which programming language is known for its use in web development and is commonly used for client-side scripting?
-
Python
-
Java
-
JavaScript
Correct!Wrong!Explanation
JavaScript is a widely-used language in web development, particularly for client-side scripting to create dynamic, interactive web pages.
-
-
4 What does the term "open source" refer to in software?
-
Software that is free to use without any restrictions
-
Software whose source code is publicly available for modification and distribution
-
Software that requires a license fee
Correct!Wrong!Explanation
Open-source software allows anyone to inspect, modify, and distribute the source code, typically under a license that promotes collaboration.
-
-
5 Which data structure uses the Last In First Out (LIFO) principle?
-
Queue
-
Stack
-
Linked list
Correct!Wrong!A stack follows the LIFO principle, where the last element added is the first one to be removed.
-
-
6 Which of the following is an example of a relational database management system (RDBMS)?
-
MongoDB
-
MySQL
-
Redis
Correct!Wrong!Explanation:
MySQL is an example of an RDBMS, which organizes data into tables that can be related to one another
-
-
7 What is the primary purpose of an operating system?
-
To run application software
-
To provide a user interface
-
To manage hardware resources and provide a platform for software
Correct!Wrong!Explanation
An operating system acts as an intermediary between the computer hardware and application software, managing resources such as memory, processing power, and storage.
-
-
8 Which sorting algorithm is generally considered the most efficient for large datasets in terms of time complexity?
-
Bubble Sort
-
Merge Sort
-
Insertion Sort
Correct!Wrong!Explanation
Merge Sort has a time complexity of O(n log n), making it more efficient for large datasets compared to bubble sort, insertion sort, and selection sort, which have O(n^2) time complexities.
-
-
9 Which of the following is an example of a NoSQL database?
-
PostgreSQL
-
Oracle
-
MongoDB
Correct!Wrong!Explanation
MongoDB is a NoSQL database, which stores data in a non-relational format, often as key-value pairs, documents, or graphs, making it suitable for unstructured data.
-
-
10 Which of the following is used for version control in software development?
-
Git
-
Docker
-
Kubernetes
Correct!Wrong!Explanation
Git is a version control system that tracks changes in source code, allowing multiple developers to collaborate and manage different versions of the codebase.
-
-
11 What is the function of a compiler?
-
To convert high-level source code into machine code
-
To execute machine code directly
-
To optimize machine code for better performance
Correct!Wrong!Explanation
A compiler translates code written in high-level programming languages into machine code or intermediate code, which can be executed by a computer.
-
-
12 Which of the following is the main advantage of using a linked list over an array?
-
Faster access to elements
-
Dynamic memory allocation
-
Fixed size
Correct!Wrong!Explanation
A linked list allows for dynamic memory allocation and doesn't require a fixed size, whereas an array has a predefined size that must be known in advance.
-
-
13 Which of the following best describes an algorithm's time complexity of O(n^2)?
-
Linear
-
Logarithmic
-
Quadratic
Correct!Wrong!Explanation
O(n^2) is considered quadratic time complexity, indicating that the time required grows proportionally to the square of the size of the input.
-
-
14 Which of these network protocols is used for secure communication over a computer network?
-
HTTP
-
HTTPS
-
FTP
Correct!Wrong!Explanation
HTTPS (HyperText Transfer Protocol Secure) is an extension of HTTP that uses encryption protocols like SSL/TLS to ensure secure communication over the internet.
-
-
15 What is the primary characteristic of a “deadlock” in computer science?
-
A program consumes too much memory
-
A system fails to boot
-
Multiple processes are stuck waiting for each other
Correct!Wrong!Explanation
A deadlock occurs when two or more processes are waiting for each other to release resources, causing all of them to remain stuck indefinitely.
-
-
16 Which of the following is a feature of a primary key in a relational database?
-
It can be null
-
It must uniquely identify a record
-
It can be changed freely
Correct!Wrong!Explanation
A primary key is used to uniquely identify each record in a table, ensuring that no two records have the same primary key value.
-
0 Comments