What does RDBMS stand for in the context of databases?

  • Recursive DBMS
  • Regular DBMS
  • Relational DBMS
  • Relationship DB
RDBMS stands for Relational Database Management System. It is a type of database management system that organizes data into tables, with each table having a unique key.

What is the purpose of primary keys in a relational database?

  • Filter data
  • Identify data
  • Sort data
  • Store data
The purpose of primary keys in a relational database is to uniquely identify each record in a table. They ensure data integrity by preventing duplicate records and are used as references in other tables.

How does the concept of interfaces promote flexibility and modularity in OOP?

  • Interfaces allow for multiple inheritance in OOP.
  • Interfaces are used for implementing data structures.
  • Interfaces define a contract that classes must adhere to.
  • Interfaces restrict access to class methods.
Interfaces in OOP provide a way to define a contract that classes must adhere to, promoting flexibility by allowing different classes to implement the same interface in their own way. This promotes modularity as it enables interchangeable components and reduces code dependencies.

How does HTTPS differ from HTTP in terms of security?

  • Authentication
  • Data Encryption
  • Port Number
  • Protocol
HTTPS uses data encryption to secure the communication between the client and server, while HTTP does not provide this level of encryption. Data encryption ensures that the data exchanged between the client and server is encoded, making it difficult for unauthorized users to intercept and understand the information being transmitted. This encryption is particularly crucial for sensitive data such as login credentials, payment information, and personal details.

What is the difference between an array and a linked list in terms of memory allocation?

  • Dynamic allocation
  • Heap allocation
  • Stack allocation
  • Static allocation
Arrays are statically allocated, meaning their size is fixed at compile time. In contrast, linked lists use dynamic allocation, allowing them to grow or shrink as needed during runtime. Static allocation is primarily used in arrays, where memory is allocated on the stack or heap, while dynamic allocation is more common in linked lists, providing flexibility in memory management.

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.

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.

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.

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.

___________ 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.