What is the primary function of an operating system?
A) Manage computer hardware and software resources
B) Compile code into machine language
C) Edit text documents
D) Design web pages
Explanation: An operating system manages computer hardware and software resources, providing services for computer programs.
Which data structure uses LIFO (Last In, First Out) principle?
A) Queue
B) Stack
C) Array
D) Linked List
Explanation: A stack is a data structure that follows the Last In, First Out (LIFO) principle, where the last element added is the first to be removed.
What does HTML stand for?
A) Hyperlink and Text Markup Language
B) High-Level Text Markup Language
C) Hypertext Markup Language
D) Hypertext Machine Language
Explanation: HTML stands for Hypertext Markup Language, which is used to create web pages.
What does the term "polymorphism" refer to in object-oriented programming?
A) The ability of different objects to respond to the same method call in different ways
B) The process by which a program breaks into multiple threads
C) The structure of variables and functions in a class
D) A method of sorting data
Explanation: Polymorphism allows objects of different types to respond to the same method call in their own unique way, which is a key feature in object-oriented programming.
What is the time complexity of linear search in the worst-case scenario?
A) O(log n)
B) O(n)
C) O(n^2)
D) O(1)
Explanation: The worst-case time complexity of linear search is O(n) because the algorithm may need to iterate through all elements in the given array.
What is the purpose of foreign keys in relational databases?
A) To allow faster data retrieval
B) To maintain referential integrity between tables
C) To increase redundancy in database tables
D) To enforce data encryption
Explanation: A foreign key ensures referential integrity by establishing a link between two tables, ensuring that the related data stays consistent.
Which protocol is widely used for sending emails?
A) FTP
B) HTTP
C) SMTP
D) DHCP
Explanation: SMTP (Simple Mail Transfer Protocol) is the standard protocol for sending emails over the Internet.
Which sorting algorithm is the fastest for large datasets when the data is not organized?
A) Bubble Sort
B) Quick Sort
C) Selection Sort
D) Merge Sort
Explanation: Quick Sort generally performs faster than other algorithms for large datasets due to its divide-and-conquer approach, especially when the pivot is well-chosen.
What does "DNS" stand for in networking?
A) Domain Name System
B) Data Networking Service
C) Distributed Node Service
D) Domain Network Security
Explanation: DNS stands for Domain Name System, which translates human-readable domain names like "example.com" into IP addresses like "192.0.2.1".
What is the primary purpose of the CPU cache in a computer?
A) Store the operating system files
B) Manage network connections
C) Reduce access time to frequently-used data
D) Store long-term files
Explanation: The CPU cache is a smaller, faster memory area located inside the CPU that reduces the access time to frequently-used instructions and data from the main memory.
Which paradigm describes "solving problems by breaking them into smaller, subproblems"?
A) Divide and conquer
B) Dynamic programming
C) Agile programming
D) Functional programming
Explanation: Divide and conquer is a paradigm where a problem is divided into smaller subproblems of the same type and solved individually to produce the final solution.
What is the purpose of normalization in databases?
A) To increase storage space
B) To reduce data redundancy
C) To enforce strict security protocols
D) To speed up data retrieval
Explanation: Normalization is a process used in databases to reduce redundancy and dependency by organizing fields and table relationships more efficiently.
Which component of a computer performs arithmetic operations?
A) Arithmetic Logic Unit (ALU)
B) Control Unit
C) Memory Unit
D) Input/Output Unit
Explanation: The Arithmetic Logic Unit (ALU) is responsible for performing arithmetic and logical operations in a computer system.
What is the function of the "JOIN" operation in SQL?
A) Combine rows from two or more tables based on a related column
B) Delete duplicate rows in a table
C) Add foreign keys to a table
D) Grant permissions to a user
Explanation: The "JOIN" operation in SQL combines rows from two or more tables based on a related column, enabling complex queries across multiple tables.
Which layer of the OSI model is responsible for data encryption and decryption?
A) Physical Layer
B) Presentation Layer
C) Data Link Layer
D) Application Layer
Explanation: The Presentation Layer in the OSI model is responsible for data translation, encryption, and decryption for secure communication.
Which keyword is used in Python to define a function?
A) def
B) func
C) function
D) defun
Explanation: The "def" keyword in Python is used to define a function, followed by the function's name and a colon.
What kind of data structure is used in Breadth-First Search (BFS) algorithm?
A) Stack
B) Queue
C) Tree
D) Graph
Explanation: The Breadth-First Search (BFS) algorithm uses a queue to explore all nodes level by level in a graph or tree.
What is the output of the logical expression (True AND False) in Python?
A) True
B) False
C) None
D) Error
Explanation: The expression (True AND False) evaluates to False because both conditions need to be true for an AND operation.
Which sorting algorithm has the worst-case time complexity of O(n^2)?
A) Merge Sort
B) Heap Sort
C) Bubble Sort
D) Quick Sort
Explanation: Bubble Sort has a worst-case time complexity of O(n^2), making it less efficient for large datasets.
What is the purpose of a MAC address in networking?
A) To route packets between networks
B) To uniquely identify a device at the data link layer
C) To establish a secure VPN connection
D) To configure DNS settings
Explanation: A MAC address uniquely identifies a device at the data link layer in a network and is used for communication between devices within the same local network.
What does "Big-O" notation measure in computer science?
A) The number of programming bugs
B) The length of the source code
C) The algorithm's time or space complexity
D) The success rate of an application
Explanation: Big-O notation measures the time or space complexity of an algorithm, giving an idea of how it scales with inputs.
Which type of network topology connects all devices to a single central node?
A) Ring
B) Star
C) Mesh
D) Bus
Explanation: A star topology connects all devices to a single central node, which acts as a hub for communication within the network.
What does the term "immutable" mean in Python?
A) It cannot be defined
B) Its value cannot be changed once created
C) It is deleted automatically after program execution
D) It only accepts integers
Explanation: An immutable object in Python, such as a string or a tuple, cannot have its value changed once it is created.
Which of the following is a NoSQL database?
A) MySQL
B) Oracle
C) MongoDB
D) PostgreSQL
Explanation: MongoDB is a NoSQL database designed for unstructured or semi-structured data, unlike relational databases like MySQL and PostgreSQL.
Which of these is a characteristic of dynamic programming?
A) Overlapping subproblems
B) Use of stacks
C) Data is unordered
D) Calculations cannot be reused
Explanation: Dynamic programming solves problems by breaking them into subproblems, where results of overlapping subproblems are reused to optimize performance.
What is the main purpose of the "HAVING" clause in SQL?
A) To filter individual rows
B) To filter group results based on aggregate functions
C) To increase query execution speed
D) To join multiple tables
Explanation: The "HAVING" clause in SQL is used to filter groups of rows based on aggregate functions like COUNT, AVG, or SUM.
What does the keyword 'static' mean in Java?
A) The member belongs to the class rather than an object
B) The member cannot be modified
C) The variable is deleted after program execution
D) It prevents further subclassing
Explanation: A static member in Java belongs to the class itself and can be accessed without creating an object of the class.
What is the main characteristic of a linked list?
A) Random access to elements
B) Fixed size
C) Dynamic memory allocation
D) Elements stored in contiguous memory locations
Explanation: A linked list dynamically allocates memory and stores elements as nodes linked by pointers, unlike arrays which use contiguous memory locations.
What is an example of an interpreted programming language?
A) Python
B) C++
C) Java (compiled to bytecode)
D) Assembly language
Explanation: Python is an interpreted language, meaning its code is executed line by line by an interpreter.
Which principle is NOT part of the Agile methodology?
A) Customer collaboration
B) Individuals and interactions
C) Heavy documentation
D) Responding to change
Explanation: Agile methodology focuses on flexibility, collaboration, and quick responses to change, rather than heavy documentation seen in traditional methods.
What is the primary purpose of the subnet mask in networking?
A) Define the network and host portions of an IP address
B) Encrypt network data
C) Determine the DNS server
D) Locate unused IP addresses
Explanation: The subnet mask is used to separate the network portion and host portion of an IP address, helping to organize and route data efficiently.
What is the purpose of the "break" keyword in a loop?
A) To skip the current iteration
B) To terminate the entire program
C) To exit the loop early
D) To restart the loop
Explanation: The "break" keyword is used to exit a loop prematurely, regardless of whether its condition has been met or not.
Which data structure is best suited for implementing a recursive function?
A) Stack
B) Queue
C) Array
D) Linked List
Explanation: A stack is used for implementing recursion because it operates on the Last-In, First-Out (LIFO) principle, which allows the most recent call to be completed first.
What does the "public" access modifier in Java indicate?
A) The member is accessible to all parts of the program
B) The member is only accessible within its class
C) The member is restricted to its package
D) The member can only be accessed through inheritance
Explanation: The "public" access modifier indicates that a class, method, or variable can be accessed from any other class in any package.
Which of the following is NOT an example of a search algorithm?
A) Binary Search
B) Linear Search
C) Depth-First Search
D) Sorting Search
Explanation: Sorting Search is not an actual search algorithm; the other options are commonly used in various applications for searching data.
Which statement is used in SQL to retrieve data from a database?
A) INSERT
B) SELECT
C) UPDATE
D) DELETE
Explanation: The SQL "SELECT" statement is used to retrieve data from one or more tables in a database.
What does HTTP stand for?
A) Hypertext Markdown Protocol
B) Hyper Terminal Transfer Protocol
C) Hypertext Transfer Protocol
D) High-Level Transfer Protocol
Explanation: HTTP stands for Hypertext Transfer Protocol, which is used for transferring data over the web between clients and servers.
What is the primary benefit of using object-oriented programming (OOP)?
A) Compact code
B) Faster compile time
C) Reusability and modularity
D) Direct memory access
Explanation: OOP allows for code reusability and modularity through the use of classes and objects, making programs easier to manage and extend.
Which of the following best describes the function of a "primary key" in a relational database?
A) Uniquely identifies each record in a table
B) Links multiple tables
C) Generates random data
D) Stores binary data
Explanation: A primary key uniquely identifies each record in a database table, ensuring there are no duplicate entries.
Which programming paradigm emphasizes the use of immutable data and pure functions?
A) Functional programming
B) Procedural programming
C) Object-oriented programming
D) Logic programming
Explanation: Functional programming emphasizes the use of pure functions and avoids shared state or mutable data to ensure predictability and clarity in code.
Which algorithm is used for finding the shortest path in a weighted graph?
A) Prim's Algorithm
B) Dijkstra's Algorithm
C) Kruskal's Algorithm
D) Depth-First Search
Explanation: Dijkstra's Algorithm is specifically designed for finding the shortest path in a weighted graph by incrementally building the shortest path tree.
What type of attack involves intercepting and modifying communication between two parties without their knowledge?
A) Denial of Service (DoS)
B) Man-in-the-Middle (MITM)
C) Phishing
D) SQL Injection
Explanation: A Man-in-the-Middle (MITM) attack occurs when an attacker secretly intercepts and modifies communication between two parties.
What does the "volatile" keyword signify in C++?
A) A variable that can never be initialized
B) A variable that can be changed at any time outside of program control
C) A constant value
D) A variable stored only in the stack
Explanation: The "volatile" keyword indicates to the compiler that the variable may be altered at any time by external factors, such as hardware, and should not be optimized.
Which of the following data structures is commonly used to implement a priority queue?
A) Array
B) Heap
C) Stack
D) Linked List
Explanation: A heap is the most common data structure used to implement a priority queue due to its efficiency in accessing the highest (or lowest) priority element.
Which HTTP method is used to update resources on a server?
A) GET
B) DELETE
C) PUT
D) HEAD
Explanation: The "PUT" method in HTTP is used to update a resource on the server, replacing its current state entirely with the new one sent with the request.
What type of graph does Dijkstra's algorithm work on?
A) Undirected and unweighted graphs
B) Directed and weighted graphs
C) Unweighted binary trees
D) Directed and unweighted graphs
Explanation: Dijkstra's algorithm is designed for graphs that are both directed and weighted, allowing it to efficiently compute the shortest paths.
What is the primary function of a database index?
A) Improve query performance
B) Increase storage capacity
C) Encrypt data
D) Manage user permissions
Explanation: A database index is used to speed up the retrieval of rows by creating pointers to data and reducing the time complexity of queries.
What is the output of the bitwise AND operation 5 & 3 in binary?
A) 111
B) 1
C) 101
D) 3
Explanation: The binary representation of 5 is 101 and 3 is 011. Performing the AND operation results in 001, which is equal to 1 in decimal.
Which of the following is a characteristic of relational databases?
A) Uses a key-value pair for storing data
B) Stores data in a semi-structured format
C) Supports document-based storage
D) Uses tables to store data in rows and columns
Explanation: Relational databases organize data into tables with rows and columns, enabling relationships between tables to ensure data integrity.
What is the main objective of garbage collection in programming?
A) Allocate memory at compile time
B) Automatically reclaim memory used by unreachable objects
C) Lock memory access
D) Create duplicate objects
Explanation: Garbage collection automatically deallocates memory for objects that are no longer reachable, preventing memory leaks and optimizing resource usage.
What is a deadlock in the context of an operating system?
A) A situation where two or more processes are unable to proceed because they are waiting for each other
B) A method to optimize system performance
C) A resource allocation strategy
D) A command-line tool
Explanation: Deadlock occurs when two or more processes compete for resources and end up in a state where none can progress without external intervention.
What is the purpose of encapsulation in object-oriented programming?
A) Restrict access to certain components of an object
B) Prevent object creation
C) Increase inheritance levels
D) Define global variables
Explanation: Encapsulation allows data hiding and protects the internal state of an object by using access modifiers, exposing only necessary functionality.
What is the time complexity of the binary search algorithm?
A) O(n)
B) O(n^2)
C) O(log n)
D) O(1)
Explanation: The binary search algorithm divides the array in half at each step, reducing the problem size logarithmically, resulting in a time complexity of O(log n).
Which protocol is used to securely transfer files over the internet?
A) HTTP
B) FTP
C) SFTP
D) SMTP
Explanation: SFTP, which stands for Secure File Transfer Protocol, is used to securely transfer files over encrypted connections.
What is a characteristic of a depth-first search (DFS) algorithm?
A) Explores neighbors first
B) Uses a stack for traversal
C) Always finds the shortest path
D) Traverses nodes by level
Explanation: DFS uses a stack-based approach to traverse deeply along each path before backtracking, fitting its "depth-first" nature.
Which type of software testing ensures that new changes do not break existing functionality?
A) Regression Testing
B) Unit Testing
C) Load Testing
D) Performance Testing
Explanation: Regression testing ensures that recent code changes have not adversely impacted the existing functionality of a software application.
What is the purpose of "virtual functions" in C++?
A) Enable runtime polymorphism
B) Force compile-time polymorphism
C) Allow global variables
D) Restrict access to private members
Explanation: Virtual functions in C++ enable runtime polymorphism by using dynamic (runtime) method dispatch, allowing child classes to override their parent class methods.
Which sorting algorithm is most efficient for large datasets with random data?
A) Quick Sort
B) Bubble Sort
C) Selection Sort
D) Insertion Sort
Explanation: Quick Sort is highly efficient for large datasets due to its divide-and-conquer approach, average-case time complexity of O(n log n), and in-place sorting.
What is the role of the OSI model in networking?
A) Encrypt data packets
B) Standardize networking communication
C) Build physical network infrastructure
D) Host web pages
Explanation: The OSI model standardizes networking communication by dividing it into seven layers, each focusing on specific tasks like data transfer, routing, or encryption.
Which programming language is known for running on the Java Virtual Machine (JVM)?
A) Python
B) Kotlin
C) C++
D) JavaScript
Explanation: Kotlin is a modern programming language designed to run on the Java Virtual Machine (JVM) and has full interoperability with Java.
Which type of network topology connects all devices to a central hub?
A) Ring
B) Star
C) Mesh
D) Bus
Explanation: A star topology connects all devices to a central hub, which acts as a single point for data transmissions.
What does the acronym CRUD stand for in software development?
A) Create, Run, Update, Delete
B) Create, Read, Update, Delete
C) Compute, Relate, Update, Deliver
D) Compile, Run, Update, Debug
Explanation: CRUD represents fundamental operations in software systems, referring to Create, Read, Update, and Delete functions.
What is the main purpose of a cache memory in a computer?
A) To increase disk storage
B) To speed up access to frequently used data
C) To provide backup storage
D) To encrypt memory data
Explanation: Cache memory is a small and fast memory type that stores frequently accessed data, enabling quicker data retrieval than from the main memory.
Which SQL keyword is used to eliminate duplicate rows in a result set?
A) DISTINCT
B) UNIQUE
C) DELETE
D) GROUP BY
Explanation: The DISTINCT keyword is used in SQL to remove duplicate rows from a query's result set, ensuring unique values for the selected column(s).
What is the Big-O notation for the best case of a Bubble Sort algorithm?
A) O(n^2)
B) O(n)
C) O(log n)
D) O(1)
Explanation: The best-case time complexity of Bubble Sort is O(n), which occurs when the array is already sorted, requiring only one scan to confirm it.
Which of the following is a core principle of Agile software development?
A) Rapid delivery of functional software
B) Strict adherence to documentation before coding
C) Development without user feedback
D) Fixed and rigid project requirements
Explanation: Agile software development focuses on rapid and iterative delivery of functional software while incorporating user feedback and adapting to changes.
What is the output of 8 >> 1 in Python?
A) 16
B) 4
C) 8
D) 2
Explanation: The ">>" operator is a right shift operator. Shifting the bits of 8 (1000 in binary) one place to the right results in 4 (0100 in binary).
Which layer of the OSI model is responsible for data formatting and encryption?
A) Network
B) Presentation
C) Session
D) Application
Explanation: The Presentation layer in the OSI model is responsible for data conversion, compression, and encryption to ensure compatibility between systems.
What is the purpose of the modulus operator (%) in most programming languages?
A) To find the remainder when one number is divided by another
B) To perform exponentiation
C) To calculate logarithms
D) To determine equality
Explanation: The modulus operator (%) returns the remainder when dividing one number by another, useful in various programming applications like checking even/odd numbers.
Which type of database does MongoDB represent?
A) NoSQL database
B) Relational database
C) Key-Value store
D) Graph database
Explanation: MongoDB is a NoSQL database based on a document-oriented model, offering flexibility and scalability for applications requiring dynamic schemas.
What does a "compiler" do in programming?
A) Translates source code into machine code
B) Executes code line by line
C) Compresses files
D) Encrypts programs
Explanation: A compiler converts high-level programming language source code into machine code that can be executed by a computer's processor.
What is the result of using the relational operator 10 > 5?
A) True
B) False
C) Null
D) Undefined
Explanation: The relational operator ">" checks whether the value on the left is greater than the value on the right. Since 10 is greater than 5, the result is True.
What is the purpose of a foreign key in a relational database?
A) To uniquely identify a row in a table
B) To allow duplicate rows in a table
C) To establish a relationship between two tables
D) To index a column for faster queries
Explanation: A foreign key is used to link two tables by establishing a relationship between a column in one table and a primary key in another table.
What is the result of the logical expression `True AND False`?
A) True
B) False
C) Null
D) Undefined
Explanation: The AND operator returns True only if both operands are True. Since one operand is False, the result is False.
What is the maximum number of children a node can have in a binary tree?
A) 1
B) 2
C) Unlimited
D) 3
Explanation: A binary tree is a data structure where each node has at most two children, typically referred to as the left and right child.
What is the main advantage of using a linked list over an array?
A) Linked lists use less memory
B) Linked lists allow dynamic memory allocation
C) Linked lists are faster for indexing
D) Linked lists are always sorted
Explanation: Unlike arrays, linked lists do not have a fixed size and can dynamically grow or shrink, which is useful for managing memory efficiently in certain scenarios.
What is the role of a constructor in object-oriented programming?
A) Initialize an object when it is created
B) Delete an object
C) Allocate memory for the program
D) Define global variables
Explanation: A constructor is a special method in a class that is called when an object of that class is created. It is used to initialize object attributes.
Which algorithm is widely used for finding the shortest path in graphs?
A) Merge Sort
B) Depth-First Search
C) Breadth-First Search
D) Dijkstra's Algorithm
Explanation: Dijkstra's Algorithm is specifically designed to find the shortest path between nodes in a graph with non-negative edge weights.
What is a "shell" in the context of operating systems?
A) Hardware interface
B) Software that runs in the background
C) Command-line interface
D) A type of network model
Explanation: A shell is an interface, often text-based, that allows the user to interact with the operating system by entering commands.
What is the purpose of a subnet mask in networking?
A) Divide an IP address into network and host portions
B) Encrypt data packets
C) Assign MAC addresses to devices
D) Translate domain names to IP addresses
Explanation: A subnet mask is used in IP networking to separate an IP address into its network and host parts, helping to manage routing of packets.
What is the primary function of the CPU in a computer?
A) Process instructions and perform computations
B) Store large amounts of data
C) Render graphics
D) Transfer files between devices
Explanation: The CPU (Central Processing Unit) is often called the "brain" of the computer. It executes instructions, performs calculations, and generally processes all core computations.
What does the term "stack overflow" refer to in computer science?
A) Exceeding database size limits
B) Filling the main memory with data
C) Exceeding the call stack size due to recursion
D) Overflowing heap memory
Explanation: Stack overflow occurs when a program uses more memory on the call stack than is allocated, often due to endless or excessive recursion.
Which of the following sorting algorithms is NOT stable?
A) Merge Sort
B) Quick Sort
C) Bubble Sort
D) Insertion Sort
Explanation: Quick Sort is not a stable sorting algorithm because it can change the relative order of equal elements during partitioning.
What is the primary purpose of DNS in networking?
A) Encrypt internet traffic
B) Assign IP addresses dynamically
C) Translate domain names to IP addresses
D) Control network traffic flow
Explanation: The Domain Name System (DNS) is used to resolve human-readable domain names into machine-readable IP addresses, enabling easier navigation of the internet.
Which programming paradigm does Python primarily support?
A) Functional
B) Object-Oriented
C) Procedural only
D) Declarative
Explanation: Python mainly supports object-oriented programming but also allows other paradigms like procedural and functional programming for greater flexibility.
What is a characteristic of the TCP protocol?
A) Reliable data transmission
B) Faster but less reliable
C) Data broadcast to all connected nodes
D) Encryption of all data
Explanation: The Transmission Control Protocol (TCP) ensures reliable delivery by establishing a connection, which includes error-checking, acknowledgements, and retransmissions if necessary.
What does the term "Polymorphism" mean in OOP?
A) Using multiple constructors
B) Multiple inheritance in a class
C) Methods with the same name perform differently
D) Class attributes changing at runtime
Explanation: Polymorphism in object-oriented programming allows methods to have the same name but behave differently depending on the object instance or input.
Which of the following data structures is primarily used for implementing a LIFO system?
A) Stack
B) Queue
C) Linked List
D) Binary Tree
Explanation: A stack operates on the Last-In-First-Out (LIFO) principle, where the last element added is the first to be removed, much like a stack of plates.
What does HTTP stand for?
A) HyperText Transfer Protocol
B) High Transfer Telemetry Protocol
C) Hybrid Text Transfer Protocol
D) HyperTransfer Token Protocol
Explanation: HTTP, or HyperText Transfer Protocol, is the foundation of data communication on the World Wide Web, enabling the transfer of HTML documents.
Which search algorithm traverses \"level by level\" in a tree?
A) Depth-First Search
B) Breadth-First Search
C) Binary Search
D) Linear Search
Explanation: Breadth-First Search (BFS) is a search algorithm that explores all the nodes of a tree level by level before moving to the next depth layer.
Which type of operating system allows multiple users to access the system simultaneously?
A) Multi-user
B) Real-time
C) Distributed
D) Embedded
Explanation: Multi-user operating systems allow multiple users to access and use system resources at the same time, often by connecting through network terminals.
What is the purpose of normalization in a relational database?
A) To remove primary keys
B) To speed up queries
C) To minimize redundancy and dependency
D) To enforce relationship constraints
Explanation: Database normalization organizes data to reduce redundancy and improve data integrity by dividing a database into smaller tables and defining relationships between them.
Which of the following is an example of a non-primitive data type?
A) Integer
B) Array
C) Float
D) Boolean
Explanation: Non-primitive data types like arrays, classes, and objects are user-defined or pre-defined types that are not directly accessible at the hardware level.
What is the difference between HTTPS and HTTP?
A) HTTPS is for mobile devices only
B) HTTP encrypts traffic
C) HTTPS uses encryption for secure communication
D) HTTPS is faster than HTTP
Explanation: HTTPS (HyperText Transfer Protocol Secure) ensures secure communication by encrypting the connection with TLS/SSL, safeguarding data during transfer.
What is a primary characteristic of static typing in programming languages?
A) Variables must be declared with a type before use
B) Variables can change type during runtime
C) Code is interpreted rather than compiled
D) Variables must store only numeric values
Explanation: Static typing requires variable types to be explicitly declared before use, helping to prevent type-related errors during compilation.
What does the term "deadlock" refer to in the context of operating systems?
A) A process waiting for memory allocation
B) A state where processes block each other indefinitely
C) A network connection failure
D) An error in file management
Explanation: Deadlock occurs when two or more processes are waiting for each other to release resources, preventing further progress indefinitely.
Which of the following sorting algorithms has the best average time complexity?
A) Merge Sort
B) Bubble Sort
C) Selection Sort
D) Heap Sort
Explanation: Merge Sort has an average and worst-case time complexity of O(n log n), making it more efficient than other algorithms like Bubble Sort and Selection Sort for large datasets.
What does the acronym "JSON" stand for?
A) Java Syntax for Object Notation
B) JavaScript Object Notation
C) Joint Syntax Orchestration Network
D) Java Serialized Object Network
Explanation: JSON, or JavaScript Object Notation, is a lightweight data interchange format widely used for APIs and data storage due to its simplicity and readability.
Which cycle in the CPU fetches, decodes, and executes an instruction?
A) Bootstrap process
B) Fetch-Decode-Execute cycle
C) Memory Access cycle
D) Clock cycle
Explanation: The Fetch-Decode-Execute cycle, also known as the instruction cycle, is the process by which a CPU retrieves an instruction, deciphers it, and carries it out.
Which data structure is commonly used to implement a priority queue?
A) Heap
B) Stack
C) Queue
D) Linked List
Explanation: A heap is a specialized tree-based data structure that satisfies the heap property and is commonly used to implement a priority queue efficiently.
Report Card
Total Questions Attempted: 0
Correct Answers: 0
Wrong Answers: 0
Percentage: 0%
No comments:
Post a Comment