Which memory management technique involves dividing memory into fixed-sized partitions?

  • Buddy system
  • Demand paging
  • Paging
  • Segmentation
The memory management technique that involves dividing memory into fixed-sized partitions is called segmentation. In segmentation, memory is divided into variable-sized segments based on logical divisions, such as code, data, and stack segments. This allows for more flexible memory allocation compared to fixed-sized partitions, which are characteristic of techniques like paging.

___________ is a divide and conquer sorting algorithm.

  • Bubble Sort
  • Insertion Sort
  • Merge Sort
  • Selection Sort
Merge sort is a classic example of a divide and conquer algorithm, where the sorting process involves dividing the array into smaller subarrays, sorting them individually, and then merging them back together in sorted order.

In a real-time chat application, you need to implement a feature that notifies users when someone is typing a message. How would you accomplish this using JavaScript?

  • Use AJAX polling to check typing status
  • Use WebSocket to send typing status
  • Use oninput event listener
  • Use setTimeout and clearTimeout for delay
Using WebSocket allows real-time communication between clients and the server, making it ideal for notifying users when someone is typing. setTimeout and clearTimeout are more suitable for handling delays and timeouts, not real-time updates. AJAX polling introduces unnecessary overhead and delays. The oninput event listener is used for detecting input changes, not real-time status updates.

Which type of testing focuses on finding defects by executing the software?

  • Dynamic testing
  • Non-functional testing
  • Static testing
  • Structural testing
Dynamic testing involves executing the software to find defects or bugs. It includes techniques like unit testing, integration testing, system testing, and acceptance testing, where the software is actively run to check its behavior and functionality. This type of testing is essential for identifying issues that may arise during actual usage of the software.

Code ___________ tools analyze code for potential issues and violations of coding standards.

  • Coverage
  • Profiling
  • Review
  • Static analysis
Static analysis tools analyze code without executing it, focusing on identifying potential issues, bugs, or violations of coding standards based on code structure, syntax, and patterns. These tools can flag issues such as unused variables, potential memory leaks, or violations of coding conventions like indentation, naming conventions, or code complexity thresholds. They are valuable in ensuring code quality, improving maintainability, and reducing the risk of introducing bugs or vulnerabilities during development. Profiling tools, on the other hand, focus on runtime behavior and performance metrics, coverage tools assess test coverage, and code review involves manual or automated inspection of code by peers or tools.

In a weighted graph, a ___________ is a subset of the edges that connects all vertices together, without any cycles.

  • Dijkstra's Algorithm
  • Kruskal's Algorithm
  • Minimum Spanning Tree
  • Spanning Tree
A spanning tree is a subset of the edges of a graph that connects all vertices without any cycles. A minimum spanning tree is specifically the smallest such spanning tree, where the sum of the weights of its edges is minimized. Dijkstra's and Kruskal's algorithms are not specific to defining such subsets in a graph.

What is the purpose of a circular queue?

  • Avoids the need for queue resizing
  • Efficient use of limited memory
  • Ensures elements are processed in a specific order
  • Supports concurrent access to queue elements
The purpose of a circular queue is to avoid the need for resizing the queue when elements are added or removed. In a circular queue, elements are stored in a circular manner, allowing for efficient use of limited memory without the overhead of resizing operations. Additionally, a circular queue supports concurrent access to queue elements, making it suitable for scenarios where multiple processes or threads access the queue simultaneously.

React's ___________ function enables developers to optimize performance by memoizing components.

  • useCallback
  • useEffect
  • useMemo
  • useState
The useMemo function in React enables developers to memoize components, which optimizes performance by caching the computed value of a function. This avoids unnecessary re-computations and enhances overall efficiency.

The _______ pattern is often used in RESTful APIs to provide access to related resources.

  • Composite
  • Composite Entity
  • Facade
  • Repository
The Repository pattern is commonly used in RESTful APIs to abstract the data access layer and provide a simplified interface for accessing related resources. It helps in organizing code and separating concerns by providing a centralized mechanism for handling database operations related to specific resources.

How does Node.js handle clustering for scaling applications?

  • Implements microservices architecture
  • Utilizes Docker containers
  • Utilizes load balancing
  • Utilizes the cluster module
Node.js clustering allows applications to utilize multiple CPU cores efficiently by creating child processes (workers) using the cluster module. Each child process runs on a separate core, enabling parallel processing and improved performance. This approach is particularly effective for scaling applications across multiple cores without relying solely on the single-threaded nature of Node.js.

Which Agile methodology emphasizes adaptability and customer collaboration over strict planning?

  • PRINCE2
  • Scrum
  • Six Sigma
  • Waterfall
Scrum is an Agile methodology that emphasizes adaptability and customer collaboration over strict planning. It encourages iterative development, frequent feedback, and a focus on delivering value to customers. Scrum teams are self-organizing and cross-functional, with a Scrum Master facilitating the process rather than dictating tasks. This approach promotes flexibility, continuous improvement, and customer satisfaction by responding to changing requirements throughout the development cycle.

The ___________ header is used to specify the format of the response accepted by the client.

  • Accept-Encoding
  • Content-Type
  • User-Agent
  • Authorization
The correct option is Content-Type. The Content-Type header in HTTP requests and responses specifies the media type of the data being sent or received. For example, it can indicate whether the data is in JSON, XML, HTML, or another format. This header helps the client and server understand how to handle the data appropriately.