Premium Employer

Persistent Systems

3.5
based on 3.6k Reviews
Filter interviews by

70+ Interview Questions and Answers

Updated 19 Nov 2024
Popular Designations
Q1. Implement indexOf()

You are given two strings A and B. Find the index of the first occurrence of A in B. If A is not present in B, then return -1.

For Example:
A = “bc”, B = “abcddbc”. String “A” is present at ...read more
View 3 more answers
Q2. LCA In A BST

You are given a binary search tree of integers with N nodes. You are also given references to two nodes P and Q from this BST.

Your task is to find the lowest common ancestor(LCA) of these two given...read more

View 3 more answers
Q3. Cycle Detection in a Singly Linked List

You have given a Singly Linked List of integers, determine if it forms a cycle or not.

A cycle occurs when a node's next points back to a previous node in the list. The li...read more

View 3 more answers
Q4. Subarray With Given Sum

Given an array ARR of N integers and an integer S. The task is to find whether there exists a subarray(positive length) of the given array such that the sum of elements of the subarray eq...read more

View 2 more answers
Discover null interview dos and don'ts from real experiences
Q5. First non repeating character

Ninja is now bored with numbers and is now playing with characters but hates when he gets repeated characters. Ninja is provided a string, and he wants to return the first unique ch...read more

View 2 more answers
Q6. DBMS Questions

Write a query from an employee table to find the salaries of the employees having even emp -id number
Explain 2,3- tier architecture and explain vies in DBMS.
Explain serialization
Explain ACID prop...read more

Add your answer
Are these interview questions helpful?

Q7. 7. what is public and private IP. how are they different

Ans.

Public and private IP addresses are used in computer networks. Public IPs are globally unique and accessible from the internet, while private IPs are used within a local network.

  • Public IP is assigned by the Internet Service Provider (ISP) and is used to identify a device on the internet.

  • Private IP is assigned by a local network administrator and is used to identify a device within a local network.

  • Public IPs are globally unique, allowing devices to communicate with each other ...read more

Add your answer

Q8. Write a program for reversing a string without using string function

Ans.

Program to reverse a string without using string function

  • Iterate through the string from end to start and append each character to a new string

  • Use a loop to swap the first and last characters, then move towards the middle until the entire string is reversed

  • Convert the string to a character array, then swap the first and last elements until the entire array is reversed

View 1 answer
Share interview questions and help millions of jobseekers 🌟

Q9. what is basic difference between c and cpp. explain on memory levels

Ans.

C is a procedural programming language while C++ is an object-oriented programming language.

  • C is a procedural programming language, meaning it focuses on procedures or functions.

  • C++ is an extension of C and adds object-oriented features like classes and inheritance.

  • C++ supports polymorphism, encapsulation, and abstraction, which C lacks.

  • C++ allows the use of standard template library (STL) for data structures and algorithms.

  • C++ has exception handling mechanisms, whereas C doe...read more

Add your answer

Q10. What are keys in database and why do we use them?

Ans.

Keys in a database are unique identifiers used to establish relationships between tables and ensure data integrity.

  • Keys are used to uniquely identify records in a database table.

  • Primary keys are used to uniquely identify each record in a table.

  • Foreign keys establish relationships between tables.

  • Keys help enforce data integrity and maintain consistency in the database.

  • Examples of keys include primary keys, foreign keys, and unique keys.

Add your answer

Q11. explain what is deadloacks and ways to prevent them

Ans.

Deadlocks are situations where two or more processes are unable to proceed because each is waiting for the other to release a resource.

  • Deadlocks occur when multiple processes are stuck in a circular waiting state.

  • Prevention techniques include resource allocation strategies, deadlock detection, and avoidance algorithms.

  • Examples of prevention techniques are using a resource allocation graph, implementing a banker's algorithm, and employing timeouts and resource preemption.

Add your answer

Q12. 8. Explain how a message is transferred in OSI layer

Ans.

A message is transferred in OSI layer through a process called encapsulation and decapsulation.

  • The message is divided into smaller chunks called packets at the transport layer.

  • Each packet is then encapsulated with headers containing necessary information.

  • The encapsulated packets are then passed down to the network layer.

  • At the network layer, the packets are further encapsulated with network layer headers.

  • The encapsulated packets are then passed down to the data link layer.

  • At ...read more

Add your answer

Q13. what is Polymorphism. what are its 3 conditions

Ans.

Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as the same type.

  • Polymorphism is achieved through method overriding and method overloading.

  • It allows for code reusability and flexibility in object-oriented programming.

  • Three conditions for polymorphism are inheritance, method overriding, and a common interface or base class.

Add your answer

Q14. 2. Explain how does Prediction works

Ans.

Prediction uses data analysis and statistical models to forecast future outcomes.

  • Prediction involves collecting and analyzing data to identify patterns and trends.

  • Statistical models are then used to make predictions based on the identified patterns.

  • Predictions can be made for a wide range of applications, such as weather forecasting, stock market trends, and customer behavior.

  • Accuracy of predictions can be improved by using machine learning algorithms and incorporating new da...read more

Add your answer

Q15. Do you know about My Passion Challenge test?

Ans.

Yes, My Passion Challenge test is a coding competition for software engineers.

  • My Passion Challenge test is a coding competition that evaluates the coding skills of software engineers.

  • It is designed to test problem-solving abilities, algorithmic thinking, and coding proficiency.

  • Participants are given a set of coding challenges to solve within a specified time limit.

  • The challenges can range from simple to complex, covering various programming languages and concepts.

  • The test ass...read more

Add your answer
Q16. OS Questions

Explain Thrashing .
Explain segmentation
State deadlock detection and prevention methods.
Explain dinning philosopher problem
Explain page fault with example.

Add your answer

Q17. 3 wheels & one scooter, each wheel can travel 5km. What will be the max distance that can be travelled?

Ans.

The max distance that can be traveled is 15km.

  • Each wheel can travel 5km, so with 3 wheels, the total distance is 15km.

  • The scooter itself does not limit the distance that can be traveled, only the wheels do.

Add your answer

Q18. 3. Draw flow Chart of classification algorithms

Ans.

Classification algorithms can be represented using flow charts.

  • Classification algorithms are used to categorize data into different classes.

  • Flow charts can be used to represent the decision-making process of classification algorithms.

  • Examples of classification algorithms include decision trees, k-nearest neighbors, and support vector machines.

Add your answer

Q19. Why do we normalise our database?

Ans.

Normalisation reduces data redundancy and improves data integrity in a database.

  • Prevents data duplication and inconsistencies

  • Simplifies database maintenance and updates

  • Improves query performance

  • Enforces data integrity and consistency

  • Follows best practices for database design

  • Examples: breaking down a customer table into separate tables for orders, addresses, and payments

  • Examples: creating a separate table for product categories instead of repeating the category name in each pr...read more

Add your answer

Q20. 1. what is Machine Learning

Ans.

Machine learning is a subset of artificial intelligence that enables machines to learn from data without being explicitly programmed.

  • It involves training algorithms on large datasets to make predictions or decisions.

  • It can be supervised, unsupervised, or semi-supervised.

  • Examples include image recognition, natural language processing, and recommendation systems.

Add your answer

Q21. How to sort the file in the range (hint provided)

Ans.

Sorting a file within a range

  • Use a sorting algorithm like quicksort or mergesort

  • Read the file and store the data in an array or list

  • Sort the array or list within the given range

  • Write the sorted data back to the file

Add your answer

Q22. What is default values of variables?

Ans.

Default values of variables are the initial values assigned to variables if no value is explicitly provided.

  • Default value for integer variables is 0

  • Default value for floating point variables is 0.0

  • Default value for boolean variables is false

  • Default value for string variables is null

  • Default value for arrays is null

Add your answer

Q23. basic important difference between java and cpp

Ans.

Java is platform independent while C++ is not.

  • Java code is compiled into bytecode which can run on any platform with a JVM, while C++ code needs to be compiled separately for each platform.

  • Java has automatic memory management through garbage collection, while C++ requires manual memory management.

  • Java has built-in support for multithreading, while C++ requires external libraries.

  • Java has a simpler syntax and is easier to learn than C++.

  • C++ allows for low-level memory manipula...read more

Add your answer

Q24. what is the difference between function overloading and function overriding?

Ans.

Function overloading is having multiple functions with the same name but different parameters. Function overriding is having a function in a subclass with the same name and parameters as a function in the superclass.

  • Function overloading is a compile-time polymorphism concept.

  • Function overriding is a runtime polymorphism concept.

  • Function overloading is used to provide different implementations of the same function for different input parameters.

  • Function overriding is used to p...read more

Add your answer

Q25. Find the second largest element from an integer array in a single traversal

Ans.

Find the second largest element from an integer array in a single traversal

  • Initialize two variables to store the largest and second largest elements

  • Traverse the array and update the variables accordingly

  • Return the second largest element

Add your answer

Q26. 3. Write a query to demonstrate outer join on given tables.

Ans.

Demonstrate outer join using SQL query

  • Use LEFT OUTER JOIN or RIGHT OUTER JOIN to include all records from one table and matching records from another table

  • Use the ON keyword to specify the join condition

  • Use COALESCE function to handle NULL values in the result set

Add your answer

Q27. which language was used in rocket launching software?

Ans.

The language used in rocket launching software is typically Ada.

  • Ada is a high-level programming language designed for embedded systems and real-time applications.

  • Ada is known for its strong typing and safety features, making it suitable for critical systems like rocket launching software.

Add your answer

Q28. 5. what is Banker's algorithm

Ans.

Banker's algorithm is a resource allocation and deadlock avoidance algorithm used in operating systems.

  • It is used to prevent deadlocks by ensuring that the system never enters an unsafe state.

  • It works by simulating the allocation of resources and checking if the system will remain in a safe state.

  • It requires knowledge of the maximum resource needs of each process and the currently available resources.

  • If a request for resources would result in an unsafe state, the request is d...read more

Add your answer

Q29. Interoperability in Inheritance and polymorphism

Ans.

Interoperability in inheritance and polymorphism allows objects of different classes to be used interchangeably.

  • Inheritance allows a subclass to inherit properties and methods from a superclass.

  • Polymorphism allows objects of different classes to be treated as if they are of the same class.

  • Interoperability between inheritance and polymorphism allows objects of different classes to be used interchangeably.

  • For example, a subclass can be used wherever a superclass is expected, an...read more

Add your answer

Q30. What are features of C++?

Ans.

C++ is a high-level programming language with features like object-oriented programming, templates, and memory management.

  • C++ supports object-oriented programming concepts like encapsulation, inheritance, and polymorphism.

  • Templates allow generic programming and code reusability.

  • C++ provides low-level memory manipulation through pointers.

  • Standard Template Library (STL) provides a collection of classes and functions for data structures and algorithms.

  • C++ supports operator overl...read more

Add your answer

Q31. What are issues in cloud?

Ans.

Issues in cloud include security, downtime, vendor lock-in, and data privacy.

  • Security concerns such as data breaches and unauthorized access

  • Downtime and service interruptions affecting business operations

  • Vendor lock-in and limited flexibility in choosing cloud providers

  • Data privacy and compliance with regulations such as GDPR and HIPAA

Add your answer

Q32. What data structure has implemented in a elevator.

Ans.

The data structure implemented in an elevator is a queue.

  • Elevator requests are added to the queue in the order they are received.

  • The elevator serves requests in a first-come, first-served manner.

  • Once a request is completed, it is removed from the queue.

  • Example: If someone on the 5th floor requests the elevator, their request is added to the queue and the elevator will serve it after completing any previous requests.

View 1 answer

Q33. implement binary search on linked list

Ans.

Implementing binary search on a linked list

  • Find the middle element of the linked list

  • Compare the middle element with the search key

  • If the middle element is greater than the search key, search in the left half of the linked list

  • If the middle element is less than the search key, search in the right half of the linked list

  • Repeat until the search key is found or the entire linked list is traversed

Add your answer

Q34. Explain encapsulation & abstraction difference.

Ans.

Encapsulation is bundling data and methods together, while abstraction is hiding the implementation details.

  • Encapsulation combines data and methods into a single unit (class).

  • Abstraction hides the complex implementation details and only shows the necessary features.

  • Encapsulation provides data security by restricting access to certain data members.

  • Abstraction allows for easier maintenance and modification of code.

  • Example: Encapsulation - a class with private data members and p...read more

Add your answer

Q35. Flow diagram of final year project

Ans.

The flow diagram of my final year project showcases the step-by-step process of its execution.

  • The flow diagram illustrates the sequence of activities and their dependencies.

  • It helps in understanding the overall structure and logic of the project.

  • Each step in the diagram represents a specific task or action.

  • Arrows indicate the flow of control or data between different steps.

  • Decision points are represented by diamond-shaped symbols.

  • Example: Start -> Input Data -> Process Data -...read more

Add your answer

Q36. What are the recommendation systems you worked on?

Ans.

I have worked on building recommendation systems for e-commerce websites and streaming platforms.

  • Implemented collaborative filtering algorithms to recommend products based on user behavior

  • Utilized content-based filtering to suggest movies or TV shows based on user preferences

  • Developed hybrid recommendation systems combining collaborative and content-based filtering techniques

Add your answer

Q37. Find 2nd largest element in an array where elements can be repeated. In O(n) complexity

Ans.

Find 2nd largest element in an array with repeated elements in O(n) complexity.

  • Traverse the array once and keep track of the largest and second largest elements.

  • If the current element is greater than the largest element, update both largest and second largest elements.

  • If the current element is between the largest and second largest elements, update only the second largest element.

Add your answer

Q38. What is Big Data?

Ans.

Big Data refers to large and complex data sets that cannot be processed using traditional data processing methods.

  • Big Data is characterized by the 3Vs - Volume, Velocity, and Variety.

  • It requires specialized tools and technologies such as Hadoop, Spark, and NoSQL databases.

  • Examples of Big Data include social media data, sensor data, and financial market data.

Add your answer

Q39. What are transaction logs

Ans.

Transaction logs are records of all the changes made to a database or file system.

  • They help in recovering data in case of system failure or errors.

  • They provide a history of all the transactions made to the database or file system.

  • They are used for auditing and compliance purposes.

  • Examples include SQL Server transaction logs, file system transaction logs, etc.

Add your answer

Q40. Hands on SQL quesries to create and manipulate table and table elements.

Ans.

Hands-on experience with SQL queries for creating and manipulating tables and table elements.

  • Use CREATE TABLE statement to create a new table

  • Use ALTER TABLE statement to add, modify, or delete columns in a table

  • Use INSERT INTO statement to add new rows of data into a table

  • Use UPDATE statement to modify existing data in a table

  • Use DELETE statement to remove rows from a table

Add your answer

Q41. What do you mean by cloud computing

Ans.

Cloud computing refers to the delivery of computing services over the internet.

  • Cloud computing allows users to access data and applications from anywhere with an internet connection

  • It eliminates the need for physical servers and hardware, reducing costs and increasing scalability

  • Examples include Amazon Web Services, Microsoft Azure, and Google Cloud Platform

Add your answer

Q42. what is precompilaion unit?

Ans.

Precompilation unit is a compiled code that can be reused by multiple source files.

  • Precompilation unit is created by the compiler from the source code.

  • It contains the compiled code of header files and other dependencies.

  • It can be reused by multiple source files, reducing compilation time.

  • It is also known as precompiled header or PCH.

  • Example: stdafx.h in Visual Studio is a precompiled header file.

Add your answer

Q43. what is thrashing

Ans.

Thrashing is a phenomenon in computer systems where excessive swapping of data between RAM and virtual memory occurs.

  • Occurs when a computer spends more time swapping data between RAM and virtual memory than executing actual tasks

  • Can be caused by insufficient RAM or poorly optimized programs

  • Can lead to a significant decrease in system performance

  • Example: A computer running multiple memory-intensive programs simultaneously may experience thrashing

Add your answer

Q44. SQL - Find duplicate, Order BY Reverse a Linked List Real-life examples for Stack and Queues

Ans.

SQL query to find duplicates, reversing a linked list, real-life examples of stacks and queues

  • To find duplicates in SQL, use GROUP BY and HAVING clauses

  • To reverse a linked list, iterate through the list and change the pointers

  • Stacks: back button in a web browser, undo feature in text editors

  • Queues: waiting in line at a grocery store, printer queue for printing documents

Add your answer

Q45. What is closure explain in detail with example

Ans.

Closure is a function that has access to variables in its outer scope, even after the outer function has returned.

  • Closure is created when a function is defined inside another function.

  • The inner function can access variables in the outer function, even after the outer function has returned.

  • Closure can be used to create private variables and functions in JavaScript.

  • Example: function outer() { var x = 10; function inner() { console.log(x); } return inner; } var closure = outer()...read more

Add your answer

Q46. implement conditional hierarchical model for java class

Ans.

Implementing a conditional hierarchical model for a Java class.

  • Create a Java class with multiple levels of hierarchy

  • Implement conditional statements to control the behavior of the class based on certain conditions

  • Use if-else or switch statements to define different actions for different conditions

  • Consider using interfaces or abstract classes for better abstraction and modularity

Add your answer

Q47. Oops concepts , difference between encapsulation and abstract and Polymorphism

Ans.

Encapsulation is bundling data and methods together, abstraction is hiding implementation details, and polymorphism allows objects to be treated as instances of their parent class.

  • Encapsulation involves bundling data and methods within a class to restrict access from outside.

  • Abstraction involves hiding the implementation details of a class and only showing the necessary features.

  • Polymorphism allows objects to be treated as instances of their parent class, enabling flexibility...read more

Add your answer

Q48. What is copy assignment operator?

Ans.

Copy assignment operator is a special member function in C++ that allows one object to be assigned the values of another object of the same class.

  • Copy assignment operator is denoted by the = operator.

  • It is used to copy the values of one object into another object of the same class.

  • It is automatically generated by the compiler if not explicitly defined.

  • Example: MyClass obj1; MyClass obj2; obj2 = obj1; // Copy assignment operator is called

Add your answer

Q49. explain any one of data structure you know

Ans.

Binary Search Tree

  • A binary tree where each node has at most two children

  • Left child is less than parent, right child is greater

  • Allows for efficient searching, insertion, and deletion

Add your answer

Q50. What is a constructor in C++?

Ans.

A constructor in C++ is a special member function that is automatically called when an object is created.

  • Constructors have the same name as the class and do not have a return type.

  • They can be used to initialize the object's data members.

  • Default constructors are automatically generated if no constructor is defined.

  • Parameterized constructors can be defined to accept arguments during object creation.

Add your answer

Q51. First 50 Prime Number

Ans.

The first 50 prime numbers are...

  • Start with 2, the first prime number

  • Check each odd number greater than 2

  • Use trial division to check if a number is prime

  • Stop when you have found 50 prime numbers

Add your answer

Q52. Write a code for half pyramid using numbers

Ans.

Code for half pyramid using numbers

  • Use nested loops to print the numbers in each row

  • The number of columns in each row should be equal to the row number

  • Start the loop from 1 and go up to the desired number of rows

Add your answer

Q53. 2 programming code on any language of your choice

Ans.

Two programming code examples in any language

  • Example 1: Python - print('Hello, World!')

  • Example 2: Java - System.out.println('Hello, World!')

Add your answer

Q54. What is virtualization in C++?

Ans.

Virtualization in C++ is the process of creating a virtual version of a class or function to allow for polymorphism and dynamic binding.

  • Virtualization in C++ is achieved through the use of virtual functions and inheritance.

  • Virtual functions are declared in a base class and overridden in derived classes to provide different implementations.

  • Virtualization allows for polymorphism, where a pointer to a base class can point to objects of derived classes.

  • Dynamic binding is used to ...read more

Add your answer

Q55. What is smart pointers?

Ans.

Smart pointers are objects that act like pointers but provide automatic memory management.

  • Smart pointers help prevent memory leaks by automatically deallocating memory when no longer needed.

  • Examples include unique_ptr, shared_ptr, and weak_ptr in C++.

  • They provide better memory safety compared to raw pointers.

Add your answer

Q56. Implement tree or queue data structure

Ans.

A tree is a hierarchical data structure with nodes connected by edges. A queue is a linear data structure that follows the FIFO principle.

  • A tree can be implemented using linked lists or arrays.

  • A queue can be implemented using arrays or linked lists.

  • In a tree, each node can have multiple child nodes.

  • In a queue, elements are added at the rear and removed from the front.

  • Both data structures are commonly used in computer science and have various applications.

Add your answer

Q57. Gave two pattern codes to solve

Ans.

I can provide solutions for pattern codes in software engineering interviews.

  • Understand the pattern and break it down into smaller components

  • Use loops and conditional statements to generate the desired pattern

  • Test the code with different inputs to ensure it works correctly

Add your answer

Q58. 1. Pattern Printing Program

Ans.

A program to print patterns using arrays of strings.

  • Create an array of strings to hold the pattern

  • Use loops to fill the array with the desired pattern

  • Print the array to display the pattern

Add your answer

Q59. Find count of each characters in string

Ans.

The task is to count the occurrences of each character in a given string.

  • Iterate through the string and use a hashmap to store the count of each character

  • Convert the string to an array of characters for easier manipulation

  • Handle edge cases like empty string or null input

  • Consider using built-in functions like HashMap in Java or Counter in Python

Add your answer

Q60. Find Freq of words in a sentence

Ans.

Use a hashmap to store word frequencies in a sentence.

  • Split the sentence into words using a space delimiter.

  • Create a hashmap to store word frequencies.

  • Iterate through the words and update the frequencies in the hashmap.

  • Return the hashmap with word frequencies.

Add your answer

Q61. difference between http and https.

Ans.

HTTP is unsecured while HTTPS is secured with SSL/TLS encryption.

  • HTTP stands for Hypertext Transfer Protocol while HTTPS stands for Hypertext Transfer Protocol Secure.

  • HTTP operates on port 80 while HTTPS operates on port 443.

  • HTTP is vulnerable to attacks while HTTPS is secure due to SSL/TLS encryption.

  • HTTPS is indicated by a padlock icon in the browser's address bar.

  • HTTPS is used for secure online transactions such as online banking, e-commerce, etc.

Add your answer

Q62. What is array in. Python

Ans.

An array in Python is a data structure that can hold multiple values of the same data type.

  • Arrays in Python are created using square brackets []

  • Elements in an array can be accessed using their index starting from 0

  • Example: names = ['Alice', 'Bob', 'Charlie']

Add your answer

Q63. Scenarios to implement code.

Ans.

Scenarios for implementing code

  • Implementing a new feature

  • Fixing a bug

  • Optimizing code for performance

  • Refactoring existing code

  • Integrating with third-party APIs

  • Handling errors and exceptions

  • Writing unit tests

  • Adding new functionality to an existing system

Add your answer

Q64. Regex matcher problem

Ans.

Regex matcher problem involves matching patterns in strings using regular expressions.

  • Understand the requirements of the regex pattern to be matched

  • Use tools like regex101.com to test and validate the regex pattern

  • Consider special characters and escape sequences in the regex pattern

Add your answer

Q65. Explain Data structures

Ans.

Data structures are ways of organizing and storing data in a computer so that it can be accessed and used efficiently.

  • Data structures are used to manage and manipulate data in programs.

  • They can be implemented using arrays, linked lists, trees, graphs, and other techniques.

  • Examples include stacks, queues, hash tables, and binary search trees.

  • Choosing the right data structure for a particular problem can greatly improve program efficiency.

Add your answer

Q66. explain dml, ddl, tcl...

Ans.

DML, DDL, and TCL are types of SQL commands used to manipulate databases.

  • DML (Data Manipulation Language) is used to manipulate data in a database, such as inserting, updating, and deleting records.

  • DDL (Data Definition Language) is used to define the structure of a database, such as creating tables, indexes, and constraints.

  • TCL (Transaction Control Language) is used to manage transactions in a database, such as committing or rolling back changes.

  • Examples of DML commands inclu...read more

Add your answer

Q67. Implement String class

Ans.

Implement a custom String class in a programming language.

  • Define a class with necessary properties and methods to manipulate strings.

  • Include methods for concatenation, substring, length, etc.

  • Handle memory allocation and deallocation properly.

  • Example: class MyString { // implementation }

Add your answer

Q68. Difference between tuple,list

Ans.

Tuple is immutable and ordered while list is mutable and ordered.

  • Tuple is defined using () while list is defined using []

  • Tuple cannot be modified while list can be modified

  • Tuple is faster than list for accessing elements

  • Tuple is used for fixed data while list is used for dynamic data

  • Example: tuple = (1, 2, 3) and list = [1, 2, 3]

Add your answer

Q69. OOPS concepts with examples

Ans.

OOPS concepts are fundamental principles in object-oriented programming.

  • Encapsulation: bundling data and methods together in a class

  • Inheritance: creating new classes from existing ones

  • Polymorphism: using a single interface to represent different types

  • Abstraction: hiding complex implementation details

  • Example: A class 'Car' with properties like 'color' and methods like 'startEngine'

Add your answer

Q70. Internal Working of HashMap

Ans.

HashMap is a data structure that stores key-value pairs and uses hashing to quickly retrieve values based on keys.

  • HashMap internally uses an array of linked lists to store key-value pairs.

  • When a key-value pair is added, the key is hashed to determine the index in the array where it will be stored.

  • If multiple keys hash to the same index, a linked list is used to handle collisions.

  • To retrieve a value, the key is hashed again to find the corresponding index and then the linked l...read more

Add your answer

Q71. Joins in SQL ?

Ans.

Joins in SQL are used to combine rows from two or more tables based on a related column between them.

  • Joins are used to retrieve data from multiple tables based on a related column

  • Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN

  • INNER JOIN returns rows when there is at least one match in both tables

  • LEFT JOIN returns all rows from the left table and the matched rows from the right table

  • RIGHT JOIN returns all rows from the right table and the matched...read more

Add your answer

Q72. Pillars of OOP ?

Ans.

Pillars of OOP are Inheritance, Encapsulation, Abstraction, and Polymorphism.

  • Inheritance allows a class to inherit properties and behavior from another class.

  • Encapsulation restricts access to certain components of an object, protecting its integrity.

  • Abstraction hides complex implementation details and only shows the necessary features.

  • Polymorphism allows objects to be treated as instances of their parent class or their own class.

Add your answer

Q73. Four pillars of OOPs

Ans.

Encapsulation, Inheritance, Polymorphism, Abstraction

  • Encapsulation: Bundling data and methods that operate on the data into a single unit

  • Inheritance: Ability to create a new class that inherits attributes and methods from an existing class

  • Polymorphism: Ability to present the same interface for different data types

  • Abstraction: Hiding the complex implementation details and showing only the necessary features

Add your answer

Q74. write a star program

Ans.

A star program prints a pattern of stars in a specific shape.

  • Use nested loops to control the number of rows and columns

  • Use if-else statements to determine when to print a star or a space

  • Example: Print a pyramid of stars with 5 rows

Add your answer

Q75. datatypes in java

Ans.

Java has various datatypes like int, double, boolean, etc. to store different types of values.

  • Primitive datatypes include int, double, boolean, char, etc.

  • Reference datatypes include classes, interfaces, arrays, etc.

  • Examples: int num = 10; double price = 19.99; boolean isTrue = true;

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at null

based on 67 interviews in the last 1 year
4 Interview rounds
Aptitude Test Round
Technical Round 1
Technical Round 2
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

3.8
 • 116 Interview Questions
4.1
 • 59 Interview Questions
4.0
 • 16 Interview Questions
3.9
 • 14 Interview Questions
3.4
 • 14 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter