Filter interviews by
Encapsulation is a mechanism of wrapping data and code acting on the data into a single unit.
Encapsulation helps in achieving data hiding and abstraction.
It provides control over the data by preventing direct access to it.
Access to the data is provided through methods, which can have additional logic to ensure data integrity.
Example: A class with private fields and public methods to access and modify those fields.
Encap...
There are 5 types of inheritance in C#.
Single inheritance - a derived class inherits from a single base class.
Multiple inheritance - a derived class inherits from multiple base classes.
Multilevel inheritance - a derived class inherits from a base class, which in turn inherits from another base class.
Hierarchical inheritance - multiple derived classes inherit from a single base class.
Hybrid inheritance - a combination o
Abstraction in C# is a way to hide implementation details and only show necessary information to the user.
Abstraction allows for creating abstract classes and interfaces
It helps in achieving loose coupling and high cohesion
Abstraction is used to provide a simplified view of complex systems
Example: A car dashboard is an abstraction of the car's internal workings
A closure is a function that has access to its outer function's variables, even after the outer function has returned.
A closure is created when a function is defined inside another function.
It allows for private variables and functions in JavaScript.
Closures are used for data hiding, encapsulation, and creating modules.
Example: function outer() { var x = 10; function inner() { console.log(x); } return inner; } var clos
I applied via Recruitment Consultant and was interviewed before Jun 2020. There were 3 interview rounds.
I applied via Naukri.com and was interviewed in Nov 2020. There was 1 interview round.
I applied via Naukri.com and was interviewed before May 2021. There were 3 interview rounds.
I applied via Naukri.com and was interviewed before Apr 2020. There was 1 interview round.
I applied via Naukri.com and was interviewed in Apr 2020. There was 1 interview round.
Synchronous means happening at the same time, while asynchronous means not happening at the same time.
Synchronous operations occur in real-time, while asynchronous operations can be delayed or queued.
Synchronous operations block the program until they are completed, while asynchronous operations allow the program to continue running.
Examples of synchronous operations include function calls and loops, while examples of ...
CTE and temp table usage in SQL
Use CTE for recursive queries and complex subqueries
Use temp tables for large data sets and complex queries
CTE is more efficient for small data sets
Temp tables can be indexed for faster performance
Consider the scope and lifespan of the data when choosing between CTE and temp table
Reverse a linked list using iterative and recursive methods.
Iterative method involves traversing the list and changing the pointers to reverse the order.
Recursive method involves calling the function recursively on the next node and changing the pointers.
Both methods have O(n) time complexity and O(1) space complexity.
Example: 1->2->3->4->5 becomes 5->4->3->2->1.
Clone a linked list with a random pointer.
Create a new node for each node in the original list.
Use a hash table to map the original nodes to their clones.
Iterate through the original list again and update the random pointers of the clone nodes.
Software Developer
5
salaries
| ₹0 L/yr - ₹0 L/yr |
Cognizant
Teleperformance
iEnergizer
Reliance Retail