Mastek
Interview Questions and Answers
Q1. What Stored procedure in sql , Database, query to find maxiumum salary
Use a stored procedure in SQL to find the maximum salary in a database table.
Create a stored procedure that selects the maximum salary from the table.
Use the MAX() function in SQL to find the maximum salary value.
Execute the stored procedure to retrieve the maximum salary.
Q2. what is Oops, Polymorphism
Oops stands for Object-Oriented Programming. Polymorphism is the ability of a function to behave differently based on the object it is called with.
Oops is a programming paradigm that uses objects and classes to design applications.
Polymorphism allows a function to take different forms based on the object it is called with.
Example: Inheritance is a form of polymorphism where a subclass can override a method from its superclass.
Q3. What's OOPs concept
OOP is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object).
Inheritance: Ability of a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the nece...read more
Q4. Revise oops concepts , sql.
OOPs concepts include inheritance, polymorphism, encapsulation, and abstraction. SQL is a language used to manage databases.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects to take on multiple forms.
Encapsulation is the practice of hiding data and methods within a class.
Abstraction is the process of hiding complex implementation details and only showing the necessary information.
SQL is used to create, modify, and quer...read more
Q5. Reverse a array
Reverse an array of strings
Create a new array and iterate through the original array in reverse order, adding each element to the new array
Use built-in array methods like reverse() or spread operator for a more concise solution
Alternatively, you can swap elements from start to end and end to start until you reach the middle of the array
Q6. Sorting algorithm
Sorting algorithm is a method to arrange elements in a specific order.
Sorting algorithms can be categorized as comparison-based or non-comparison-based.
Examples of sorting algorithms include Bubble Sort, Merge Sort, and Quick Sort.
Efficiency of sorting algorithms is measured in terms of time complexity and space complexity.
Q7. Explain Inheritance
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Allows a class to inherit attributes and methods from another class
Promotes code reusability and reduces redundancy
Creates a parent-child relationship between classes
Derived class can override or extend the functionality of the base class
Example: Class 'Car' can inherit from class 'Vehicle' and inherit properties like 'color' and methods like 'drive()'
Interview Process at null
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month