InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What do you understand about kernel in the context of Operating Systems? |
|
Answer» The kernel is a component of an operating system that manages computer and hardware functions. It primarily oversees memory and CPU functions. It's a crucial part of any operating system. Kernel serves as a link between applications and hardware-based data processing via inter-process communication and system calls. When an operating system is loaded, the kernel is loaded initially and remains in memory until the operating system is SHUT down. It's in charge of things like disk management, task management, and memory management. The following are the different types of the kernel in Operating Systems:
|
|
| 2. |
What is the difference between deadlock and starvation in the context of Operating Systems? |
||||||||||
|
Answer» Deadlock - When each process possesses a resource and waits for ANOTHER process to retain a resource, a deadlock ensues. Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait are all necessary circumstances for the deadlock to occur. No process that is holding one resource while waiting for another is performed in this scenario. Starvation - When high priority processes continue to RUN while low priority processes are stalled for an indeterminate time, this is known as starvation. A continual stream of higher-priority processes in a densely loaded computer system can prevent a low-priority operation from ever receiving the CPU. When resources are SCARCE, high-priority processes consume them continuously. Ageing can help to tackle the problem of starvation. The importance of LONG waiting processes is increasingly raised as processes age. The following table lists the differences between deadlock and starvation:
|
|||||||||||
| 3. |
What do you understand about deadlocks in the context of Operating Systems? What are the necessary conditions for deadlock to occur in a system? |
|
Answer» When a process enters a WAITING state because another waiting process is holding the requested resource, it is referred to as a deadlock. A typical difficulty in multi-processing is a deadlock, which occurs when numerous processes share a mutually exclusive resource known as a soft lock or software. The FOLLOWING are the necessary conditions for a deadlock to occur in a system:
|
|
| 4. |
What do you understand about Data Independence in the context of DataBase Management Systems (DBMS)? |
|
Answer» In Database Management Systems (DBMS), data independence implies that the application is independent of the storage structure and data ACCESS mechanism. It allows you to change the schema definition at one level without having to change the schema definition at the next level up. Data independence can be divided into two categories:
|
|
| 5. |
What do you understand about ACID properties in the context of Database Management Systems (DBMS)? |
|
Answer» The ACID properties for a TRANSACTION in SQL DBMS refers to the following properties:
|
|
| 6. |
What do you understand by query optimisation in the context of SQL? |
|
Answer» A single query can be run using various methods or rewritten in various formats and STRUCTURES. As a result, the topic of query optimization arises: which of these forms or paths is the most efficient? The query optimizer considers all alternative query plans to discover the most efficient way to EXECUTE a query. The purpose of query optimization is to reduce the number of system resources necessary to complete a query, allowing the user to receive the proper result set more quickly.
A query can be optimised in one of two ways:
|
|
| 7. |
What do you know about RDBMS? What are the advantages and disadvantages of using RDBMS? |
|
Answer» RDBMS is an acronym for Relational DataBase Management Systems. It's an application that LETS us build, remove, and update relational databases. A relational database is a database system that stores and retrieves data in the FORM of rows and columns in a tabular format. It is a minor subset of DBMS that was created in the 1970s by E.F Codd. The MAJOR DBMS, such as SQL, My-SQL, and ORACLE, are all based on relational DBMS concepts. The following features are simulated by Relational Database Management Systems to maintain data integrity:
The following are the advantages of an RDMS:
The following are the disadvantages of an RDMS:
|
|
| 8. |
What do you understand about checkpoints in the context of Database Management Systems (DBMS)? What are the advantages of using checkpoints? |
|
Answer» The checkpoint specifies a time when the DBMS was in a consistent state and all transactions had been committed. These checkpoints are tracked during transaction execution. Transaction log files will be created after the execution. The log file is destroyed when it reaches the savepoint/checkpoint by RECORDING its update to the database. Then a NEW log is produced with the transaction's upcoming execution actions, which is updated until the next checkpoint, and the process continues. When transaction logs are created in a real-time SETTING, they consume a significant amount of storage space. Keeping track of each update and maintaining it may also take up more physical space on the system. As the transaction log file grows in size, it may eventually become unmanageable. Checkpoints can be used to address this. A Checkpoint is a way for deleting all prior transaction logs and saving them in a permanent storage location. The following are the advantages of checkpoints:
|
|
| 9. |
What is the difference between mutable and immutable objects in the context of the Java programming language? |
||||||||||||
Answer»
The following table LISTS the differences between mutable objects and immutable objects:
|
|||||||||||||
| 10. |
What is the difference between functions and procedures in the context of computer programming? |
||||||||||||||||||
Answer»
The following table lists the differences between functions and procedures:
|
|||||||||||||||||||
| 11. |
What do you understand about virtual functions in the context of the C++ programming language? |
|
Answer» A virtual function is a MEMBER function defined in a base class that is redefined (overridden) by a derived class. When you use a pointer or a reference to the base class to refer to a derived class object, you can call a virtual function for that object and have it run the derived class's version of the function. Regardless of the type of reference (or pointer) used for the function call, virtual functions ENSURE that the right function is called for an object. They're mostly used to achieve polymorphism at runtime. The virtual KEYWORD is used to DECLARE functions in base classes. The call to a virtual function is resolved at runtime. Let us understand it better with the help of the following example: #include<bits/stdc++.h>using namespace std;class Parent {public: virtual void fun() // virtual function { cout << "Inside the fun() method of Parent class\n"; } void foo() { cout << "Inside the foo() method of Parent class\n"; }};class Child : public Parent {public: void fun() { cout << "Inside the fun() method of Child class\n"; } void foo() { cout << "Inside the foo() method of Child class\n"; }};int main(){ Parent *parent_object_pointer; Child child_object_pointer; parent_object_pointer = &child_object_pointer; // Virtual function, binded at runtime parent_object_pointer->fun(); // Non-virtual function, binded at compile time parent_object_pointer->foo(); return 0;}Output: Inside the fun() method of Child classInside the foo() method of Parent classExplanation: In the above code, the class Child inherits from the class Parent. Two methods fun() and foo() are defined in the Parent class and are overridden in the Child class. However, the fun() method is declared as a virtual function by using the ‘virtual’ keyword. Inside the main() method, we create an object of the Parent class and initialise it with an object of the Child class. So, the call to the fun() method is resolved at run time and not at compile time. Because of this, the statement “Inside the fun() method of Child class” gets printed. SIMILARLY, the call to the foo() method gets resolved at compile time and not at run time. Because of this, the statement “Inside the foo() method of Parent class” gets printed. |
|
| 12. |
What do you understand about Abstraction in the context of Object-Oriented Programming languages? What are its advantages? |
|
Answer» Abstraction Is obfuscating the internal implementation and focusing solely on the services. It is accomplished by utilising abstract classes and interfaces and then putting them into action. Only the features of an object that distinguish it from all other objects are required. Only the most crucial details are highlighted, while the remainder is hidden from the user or reader. Let us consider an example of abstraction in the real world: By emphasizing the set of services offered by the bank via the ATM GUI screen, the bank is highlighting the set of services offered by the bank without highlighting internal implementation. Abstraction can be divided into three CATEGORIES as follows:
The following are the advantages of abstraction:
|
|
| 13. |
What do you understand about exceptions in the context of the Java programming language? What are the different types of exceptions in Java? |
|
Answer» An EXCEPTION is an unwelcome or unexpected occurrence that occurs during the execution of a program, i.e. at run time, and disturbs the program's usual flow of instructions. The APPLICATION can detect and handle exceptions. When a method throws an exception, it creates an object. The exception object is the name given to this object. It contains details about the exception, such as the name and DESCRIPTION of the error, as well as the program's state at the time the error occurred. An exception can happen for a variety of reasons. Here are a few examples:
Java defines several different types of exceptions for its various class libraries. Users can also define their exceptions in Java. The following are the different types of exceptions in Java:
|
|
| 14. |
What is the difference between method overloading and method overriding in the context of the Java programming language? |
||||||||||||
Answer»
The following table lists the differences between method overloading and method overriding:
|
|||||||||||||
| 15. |
What are some of the advantages and disadvantages of Object-Oriented Programming languages? |
|
Answer» The following are the advantages of Object ORIENTED Programming languages:
The following are the disadvantages of Object-Oriented Programming languages:
|
|
| 16. |
What are the differences between C and C++ programming languages? |
Answer»
You can learn more about their differences here. |
|