HCLTech
100+ Interview Questions and Answers
Nth term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -
F(n) = F(n-1) + F(n-2), Where, F(1) = F(2) = 1
Provided N you have to find out the ...read more
Given an array with N elements, the task is to reverse all the array elements and print the reversed array.
Input Format:
The first line contains an integer N representing the size of the array...read more
Q3. Why you choose Machine Learning (during Workshop) ?
I chose Machine Learning during the workshop because of its potential to solve complex problems and make predictions.
I was fascinated by the idea of training machines to learn from data and make predictions
I saw the potential of Machine Learning in solving complex problems that traditional programming couldn't
I was impressed by the real-world applications of Machine Learning, such as image recognition and natural language processing
Q4. what's difference between server.transfer and Response.redirect
Difference between server.transfer and Response.redirect
Server.Transfer transfers control to another page on the server without the client knowing
Response.Redirect sends a message to the client to redirect to another page
Server.Transfer is faster and more efficient than Response.Redirect
Server.Transfer can only be used within the same application, while Response.Redirect can be used to redirect to any URL
Q5. What is final keyword? Differentiate between final and static.
The final keyword is used in Java to indicate that a variable, method, or class cannot be changed or overridden.
Final variables cannot be reassigned once initialized.
Final methods cannot be overridden in subclasses.
Final classes cannot be extended by other classes.
Static variables are shared among all instances of a class.
Static methods can be called without creating an instance of the class.
Q6. Oops Difference between classes and interfaces, use of getter and setters, instance variable vs local variable, encapsulation, do multiple catch block exist, use of final keyword, stringbuffer vs stringbuilder,...
read moreA software engineer interview question covering various Java concepts.
Classes are blueprints for objects, while interfaces define a set of methods that a class must implement.
Getter and setter methods are used to access and modify the values of instance variables.
Instance variables are declared within a class and are accessible throughout the class, while local variables are declared within a method and are only accessible within that method.
Encapsulation is the practice of h...read more
Q7. What is the difference between Abstarct Class and Interface ?
Abstract class can have implementation while interface cannot. A class can implement multiple interfaces but can extend only one abstract class.
Abstract class can have constructors while interface cannot.
Abstract class can have instance variables while interface cannot.
Abstract class can have non-abstract methods while interface cannot.
A class implementing an interface must implement all its methods while it can choose to implement only some methods of an abstract class.
An ab...read more
Q8. What is JDK JRE JVM ? Java8 features
JDK is Java Development Kit, JRE is Java Runtime Environment, and JVM is Java Virtual Machine. Java8 features include lambda expressions, streams, and default methods.
JDK is a software development kit that provides tools for developing, debugging, and monitoring Java applications.
JRE is a runtime environment that allows running Java applications. It includes JVM and necessary libraries.
JVM is a virtual machine that executes Java bytecode. It provides platform independence and...read more
Q9. What is the difference between C,Java?
C is a procedural language while Java is an object-oriented language.
C is a low-level language while Java is a high-level language.
C requires manual memory management while Java has automatic garbage collection.
Java is platform-independent while C is platform-dependent.
Java has built-in support for multithreading while C does not.
Java has a larger standard library compared to C.
C is commonly used for system programming while Java is commonly used for web and mobile applicatio...read more
Q10. What is difference between microcontroller and microprocessor?
Microcontroller is a single chip computer with on-chip memory and peripherals, while microprocessor is a CPU only.
Microcontroller has on-chip memory and peripherals, while microprocessor requires external memory and peripherals.
Microcontroller is used in embedded systems, while microprocessor is used in general-purpose computing.
Examples of microcontrollers include Arduino, PIC, and AVR, while examples of microprocessors include Intel Pentium, AMD Ryzen, and ARM Cortex.
Microc...read more
Q11. Spring boot: Various Annotations, Difference b/w @RestController vs @Controller , @Bean vs @Component, @RequestMapping vs @GetMapping,
Explaining various Spring Boot annotations and their differences.
RestController vs Controller: RestController is used for RESTful web services while Controller is used for traditional web applications.
Bean vs Component: Bean is used to define a single object while Component is used to define a class as a Spring-managed component.
RequestMapping vs GetMapping: RequestMapping is used to map HTTP requests while GetMapping is used specifically for GET requests.
Q12. 1) Advantage of springboot over spring 2) Tell me all the anotations you know in spring 3) What are CRUD operations, write controller layer and use validating annotations like @NotNull, @valid etc. how to valid...
read moreThe interview questions cover various topics related to Spring framework, REST vs SOAP, JPA repository, Feign client, circuit breaker, and Spring Security.
Spring Boot provides a simpler and faster way to set up and run Spring applications compared to traditional Spring.
Common annotations in Spring include @Controller, @Service, @Repository, @Autowired, @Component, @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, @Valid, @NotNull, etc.
CRUD operations re...read more
Q13. What's copy constructor why it is needed to pass by reference
Copy constructor creates a new object by copying an existing object.
Copy constructor is used to create a new object with the same values as an existing object.
It is needed to pass by reference to avoid creating a copy of the object, which can be expensive.
Passing by reference allows the new object to share the same memory as the original object.
Copy constructor is automatically called when a new object is created from an existing object.
Q14. String builder and string buffer When we create Arrays and when we create linked lists Treeset in Java Java 8 features Static keyword Dynamic method dispatch How to make a immutable class in Java Marker Interfa...
read moreQuestions related to Java programming language concepts and features.
StringBuilder and StringBuffer are used for efficient string manipulation.
Arrays are fixed in size while linked lists can grow dynamically.
TreeSet is a sorted set implementation in Java.
Java 8 introduced lambda expressions, streams, and functional interfaces.
Static keyword is used to create class-level variables and methods.
Dynamic method dispatch is the mechanism by which a call to an overridden method is r...read more
Q15. What is oops? Explain about oops? What is .net framework? What is page lifecycle? What is mvc?. Explain about mvc patterns?. Explain table, store procedure, views, functions in SQL?
Questions related to software engineering concepts and SQL
OOPs stands for Object-Oriented Programming which is a programming paradigm based on the concept of objects
.NET Framework is a software framework developed by Microsoft that provides a programming model for building applications
Page lifecycle refers to the stages that a web page goes through from creation to destruction
MVC stands for Model-View-Controller which is a software design pattern for developing web applicatio...read more
Q16. 1) OOPS in java, and told to explain abstraction, encapsulation, inheritance with practical code 2) Exception handling(globally), Authentication and authorization 3) SOLID principles and factory design pattern ...
read moreInterview questions for Software Engineer position covering OOPS concepts, exception handling, SOLID principles, Java 8 features, and Streams.
Abstraction in OOPS: Hiding implementation details. Example: Abstract class Shape with method draw().
Encapsulation in OOPS: Bundling data and methods that operate on the data. Example: Class Employee with private fields and public getters/setters.
Inheritance in OOPS: Reusing code and extending functionality. Example: Class Dog extends A...read more
Q17. Problem about virtual function and explain it with vtable and vptr how it will work how it will work when child is pointing to base class
Explaining virtual function problem with vtable and vptr
Virtual functions allow polymorphism by allowing child classes to override base class functions
Vtable is a table of function pointers that maps virtual functions to their implementations
Vptr is a pointer to the vtable of an object
When a child class object is pointing to a base class object, the vptr points to the base class vtable
This can cause issues if the child class has overridden a virtual function, as the base clas...read more
Q18. In 5 programs without effecting one by one how can you debug a particular program and how can you know tha program is calling in debug
To debug a particular program without affecting others, use breakpoints and step through the code.
Set a breakpoint in the program you want to debug
Step through the code using a debugger to identify the issue
Use logging statements to track the flow of the program
Check the call stack to see which functions are being called
Use conditional breakpoints to stop the program at specific points
Q19. what is second level cache?How to implement second level cache?How to optimize sql query?what are solid principles?
Second level cache is a caching mechanism used to improve performance by storing frequently accessed data in memory.
Second level cache is implemented at the application level and can be configured using frameworks like Hibernate.
To optimize SQL queries, one can use indexes, avoid using SELECT *, and use JOINs instead of subqueries.
SOLID principles are a set of design principles for writing maintainable and scalable code.
SOLID stands for Single Responsibility, Open-Closed, Lis...read more
Q20. What string pool in java and why string is immutable
String pool is a cache of string literals in Java. String is immutable to ensure security and efficiency.
String pool is a collection of unique string literals stored in heap memory.
When a new string is created, JVM checks if it already exists in the pool. If yes, it returns the reference to the existing object.
String immutability ensures that once a string is created, its value cannot be changed. This ensures security and efficiency.
For example, if a password is stored as a s...read more
Q21. 2. What is the difference between object oriented programming language and procedure oriented programming language?
Object oriented programming focuses on objects and their interactions, while procedure oriented programming focuses on functions and procedures.
Object oriented programming uses classes and objects to encapsulate data and behavior, while procedure oriented programming uses functions to manipulate data.
In OOP, inheritance and polymorphism are key concepts, while in POP, modularity and reusability are emphasized.
Examples of OOP languages include Java and Python, while examples o...read more
Q22. What is difference between structure and array?
Structure is a user-defined data type that can hold variables of different data types. Array is a collection of similar data types.
Structures can have variables of different data types while arrays can only have variables of the same data type.
Structures can also have functions while arrays cannot.
Example: struct student {int id; char name[20]; float marks;}; int marksArray[5];
Q23. What is difference between if else and switch ?
if else is used for conditional statements with multiple conditions while switch is used for multiple conditions with same variable.
if else can handle multiple conditions with different outcomes
switch can handle multiple conditions with same outcome
if else is more flexible and can handle complex conditions
switch is faster and easier to read for simple conditions
example of if else: if (x > 5) {do something} else if (x < 5) {do something else} else {do something else}
example of...read more
Q24. What was pointer to a pointer in C language?
A pointer to a pointer is a variable that stores the memory address of another pointer variable.
It is used to modify the value of a pointer indirectly.
It is denoted by ** in C language.
It is commonly used in dynamic memory allocation.
Example: int **ptr; // pointer to a pointer to an integer
Q25. What is dbms ?what is data module?what is difference file structure and storage structure?operations on stack?built in types in python?
DBMS is a software system that manages databases. Data module is a component of DBMS. File structure and storage structure differ in their organization of data. Stack operations include push and pop. Python has built-in types like int, float, and str.
DBMS manages databases, while data module is a component of DBMS.
File structure and storage structure differ in their organization of data.
Stack operations include push and pop.
Python has built-in types like int, float, and str.
Q26. What is difference between left join and right join, Also implement the same.
Left join returns all records from left table and matching records from right table, right join returns all records from right table and matching records from left table.
Left join keeps all records from left table and matching records from right table
Right join keeps all records from right table and matching records from left table
Use ON keyword to specify the join condition
Example: SELECT * FROM table1 LEFT JOIN table2 ON table1.id = table2.id
Example: SELECT * FROM table1 RI...read more
Q27. How can you acheive the same result as FULL JOIN without using the Keyword FULL JOIN in your query
Achieve the same result as FULL JOIN without using the keyword FULL JOIN in your query.
Use a combination of LEFT JOIN and RIGHT JOIN to achieve the same result as FULL JOIN.
Combine the results of both LEFT JOIN and RIGHT JOIN using UNION operator.
Use COALESCE function to handle NULL values in the resulting table.
Example: SELECT * FROM table1 LEFT JOIN table2 ON table1.id = table2.id UNION SELECT * FROM table1 RIGHT JOIN table2 ON table1.id = table2.id WHERE table1.id IS NULL ...read more
Q28. How to remove duplicate from excel data ?
To remove duplicates from Excel data, use the Remove Duplicates feature under the Data tab.
Select the range of cells that contain the data you want to remove duplicates from.
Click on the Data tab and select Remove Duplicates.
Choose the columns that you want to check for duplicates and click OK.
The duplicates will be removed and a message will appear showing how many duplicates were removed.
You can also use the COUNTIF function to identify and remove duplicates.
Example: =IF(CO...read more
Q29. 1) Java features 2) Access Modifiers 3) Arraylist 4) explain private and Default access modifiers 5) What is collection And explain Arraylist. 6) what is exception handling what it use in java. 7)Throw and thro...
read moreJava features, access modifiers, ArrayList, exception handling, and throw/throws in Java.
Java features include platform independence, object-oriented programming, and automatic memory management.
Access modifiers in Java are public, private, protected, and default. They control the visibility and accessibility of classes, methods, and variables.
ArrayList is a dynamic array in Java that can grow or shrink in size. It is part of the Java Collections Framework.
Private access modi...read more
Q30. Tell the difference between C++ and Java in terms of OOPS concept?
C++ supports multiple inheritance, Java supports single inheritance. C++ has pointers, Java has references.
C++ supports multiple inheritance, Java supports single inheritance
C++ has pointers, Java has references
C++ allows operator overloading, Java does not
C++ has destructors, Java has finalizers
Q31. What was a pointer in c language?
A pointer in C language is a variable that stores the memory address of another variable.
Pointers are used to manipulate data directly in memory
They can be used to pass data between functions efficiently
Pointers can be used to create dynamic data structures like linked lists
Example: int *ptr; ptr = # *ptr = 10; //num now has a value of 10
Q32. Explain more about abstraction what are access modifiers
Abstraction is the process of hiding implementation details while showing only the necessary information.
Abstraction helps in reducing complexity and increasing efficiency.
It allows us to focus on what an object does instead of how it does it.
For example, a car's driver only needs to know how to drive it, not how the engine works.
Access modifiers are keywords in object-oriented programming that determine the accessibility of class members.
There are four types of access modifi...read more
Q33. How long will it take for you to learn a new programming language?
It depends on the complexity of the language and my prior experience with similar languages.
I can learn a new language quickly if it is similar to ones I already know.
If the language is completely new to me, it may take a few weeks to become proficient.
I would need to spend time practicing and working on projects to fully master the language.
Learning a new language is an ongoing process, and I would continue to improve my skills over time.
Q34. What is executor in multithreading and what is thread pool
Executor is an interface that executes submitted tasks in a separate thread. Thread pool is a collection of threads that can be reused.
Executor provides a way to decouple task submission from task execution.
Thread pool manages a fixed number of threads and assigns tasks to them.
Executor framework provides a way to manage thread pools.
Example: Executors.newFixedThreadPool(10) creates a thread pool with 10 threads.
Example: Executor.execute(Runnable task) submits a task to the e...read more
Q35. Do you have experience in java 8 , could u explain some new features
Yes, Java 8 introduced several new features including lambda expressions, streams, and default methods.
Lambda expressions allow for functional programming and simplify code.
Streams provide a way to process collections of data in a functional way.
Default methods allow for adding new methods to interfaces without breaking existing implementations.
Other new features include the Optional class, Date and Time API, and Nashorn JavaScript engine.
Example: Lambda expression - (x, y) -...read more
Q36. Implement stack using array in C++ write code
Implement stack using array in C++
Declare an array and a variable to keep track of top element
Push element by incrementing top and assigning value to array[top]
Pop element by returning array[top] and decrementing top
Check for overflow and underflow conditions
Q37. What is function pointer?
Function pointer is a variable that stores the address of a function.
Function pointers can be used to pass a function as an argument to another function.
They can also be used to create callbacks and implement polymorphism.
Example: int (*funcPtr)(int, int) = &add; where add is a function that takes two integers and returns their sum.
Dereferencing a function pointer calls the function it points to.
Q38. What is map and what is collection and all those things
Map and Collection are data structures in programming used to store and manipulate data.
Map is a key-value pair data structure where each value is associated with a unique key.
Collection is a group of objects that can be accessed and manipulated as a single unit.
Examples of collections include lists, sets, and queues.
Maps are commonly used for caching, indexing, and searching data.
Collections are used for storing and manipulating data in various ways such as sorting, filterin...read more
Q39. What are jagged array
Jagged arrays are arrays of arrays with different lengths.
Jagged arrays are also known as ragged arrays.
They are useful when the number of elements in each row is not fixed.
Example: int[][] jaggedArray = new int[3][]; jaggedArray[0] = new int[2]; jaggedArray[1] = new int[4]; jaggedArray[2] = new int[3];
Accessing elements in a jagged array requires two sets of square brackets.
Jagged arrays can be used to represent irregularly shaped data, such as a matrix with missing values.
Q40. Explain Basic of OOP pillers
The four pillars of OOP are encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods together in a class to hide implementation details.
Inheritance: Creating new classes from existing ones, inheriting their properties and behaviors.
Polymorphism: The ability of objects of different classes to respond to the same method call.
Abstraction: Simplifying complex systems by breaking them down into smaller, more manageable parts.
Q41. how to generate encrypted passwords for user module
Encrypted passwords for user module can be generated using hashing algorithms like bcrypt or PBKDF2.
Choose a strong hashing algorithm like bcrypt or PBKDF2
Generate a random salt for each user
Combine the password and salt, and hash the result using the chosen algorithm
Store the salt and hashed password in the database
When verifying a password, retrieve the salt for the user, combine it with the entered password, and hash the result using the same algorithm. Compare the resulti...read more
Q42. What do you mean by oops concept
OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of 'objects', which can contain data and code.
OOPs focuses on the use of classes and objects to organize and structure code
Encapsulation, inheritance, and polymorphism are key concepts in OOPs
Examples of OOPs languages include Java, C++, and Python
Q43. What are the type if data structure.
Data structures are ways of organizing and storing data in a computer so that it can be accessed and used efficiently.
There are two main types of data structures: primitive and non-primitive
Primitive data structures include integers, floats, characters, and booleans
Non-primitive data structures include arrays, linked lists, stacks, queues, trees, and graphs
Each data structure has its own advantages and disadvantages depending on the use case
Q44. What do you mean by 64bit and 32bit .
64bit and 32bit refer to the size of data that a processor can handle.
64bit processors can handle larger amounts of memory and perform faster than 32bit processors.
64bit processors are more efficient in handling complex calculations and running multiple applications simultaneously.
32bit processors are limited to 4GB of RAM and can only handle 32bit software.
Most modern computers and operating systems are 64bit.
Examples of 64bit processors include Intel Core i5 and i7, AMD Ryz...read more
Q45. What do you mean by control structure.
Control structure refers to the way a program is organized and executed based on certain conditions.
Control structures are used to control the flow of a program.
They include if-else statements, loops, and switch statements.
If-else statements allow for conditional execution of code.
Loops allow for repeated execution of code.
Switch statements allow for multiple possible outcomes based on a single variable.
Proper use of control structures can improve program efficiency and reada...read more
Q46. Difference between while loop and do while loop.
While loop executes only if the condition is true, do while loop executes at least once before checking the condition.
While loop checks the condition first, then executes the code block
Do while loop executes the code block first, then checks the condition
While loop may not execute at all if the condition is false initially
Do while loop always executes at least once
While loop is a pre-test loop, do while loop is a post-test loop
Q47. 1.Oops concepts 2.what is list and tuples 3.write code to sort the string
Interview questions for Software Engineer on OOPs concepts, list and tuples, and sorting strings.
OOPs concepts include inheritance, polymorphism, encapsulation, and abstraction.
Lists and tuples are data structures in Python. Lists are mutable while tuples are immutable.
To sort a string in Python, use the sorted() function or the sort() method.
Q48. How can you handle different exceptionsin in a class
Handle exceptions in a class by using try-catch blocks and throwing custom exceptions.
Use try-catch blocks to catch exceptions and handle them appropriately.
Throw custom exceptions to provide more specific information about the error.
Use multiple catch blocks to handle different types of exceptions.
Implement a finally block to execute code regardless of whether an exception is thrown or not.
Q49. What all technology are you aware of
I am aware of various technologies including programming languages, databases, frameworks, and tools.
Programming languages: Java, Python, C++, JavaScript, Ruby, PHP
Databases: MySQL, MongoDB, Oracle, SQL Server
Frameworks: Spring, Django, Ruby on Rails, AngularJS
Tools: Git, Jenkins, Docker, Kubernetes
Operating Systems: Windows, Linux, macOS
Q50. What are oops concepts and describe each?
OOPs concepts are the fundamental principles of object-oriented programming.
Abstraction: Hiding implementation details and showing only necessary information.
Encapsulation: Binding data and functions together in a single unit.
Inheritance: Acquiring properties and behavior of a parent class by a child class.
Polymorphism: Ability of an object to take many forms or have multiple behaviors.
Association: Relationship between two objects.
Aggregation: A special form of association wh...read more
Q51. Explain the data structures like linked list, dfs and bfs.
Linked list is a linear data structure. DFS and BFS are graph traversal algorithms.
Linked list is a collection of nodes where each node points to the next node.
DFS (Depth First Search) is a traversal algorithm that explores as far as possible along each branch before backtracking.
BFS (Breadth First Search) is a traversal algorithm that explores all the vertices of a graph in breadth-first order.
Example of linked list: 1->2->3->4->5
Example of DFS: starting from node A, explore...read more
Q52. What's run time polymorphism
Run time polymorphism is the ability of an object to take on multiple forms at runtime.
It allows objects of different classes to be treated as if they belong to a single class hierarchy.
It is achieved through method overriding and dynamic binding.
Example: Animal class with subclasses Dog and Cat. A method speak() is overridden in both subclasses.
At runtime, an object of type Animal can refer to either a Dog or a Cat object and call their respective speak() methods.
Q53. How to deploy a project with server port.
To deploy a project with server port, you need to specify the port number in the project configuration and ensure the server is listening on that port.
Specify the port number in the project configuration file (e.g. server.js or application.properties).
Ensure the server code is configured to listen on the specified port.
Update any firewall or security settings to allow traffic on the specified port.
Use tools like Docker or Kubernetes to deploy the project with the specified po...read more
Q54. What is singleton class in java
Singleton class is a class that can have only one instance and provides a global point of access to it.
Singleton class is used when we need to ensure that only one instance of a class is created throughout the application.
It is implemented by making the constructor private and providing a static method to get the instance of the class.
Example: java.lang.Runtime is a singleton class that provides access to the runtime environment of the current Java application.
Singleton patte...read more
Q55. What is different between M-view and view?
M-view is a specific type of view used in software engineering.
M-view stands for Model-view and is a design pattern used to separate the data model from the user interface.
It helps in achieving a clear separation of concerns and promotes code reusability.
M-view is commonly used in frameworks like MVC (Model-View-Controller) and MVVM (Model-View-ViewModel).
On the other hand, a view refers to the user interface component that presents the data to the user.
Views are responsible ...read more
Q56. How to deploy application in aws?
To deploy an application in AWS, you need to create an EC2 instance, configure security groups, install necessary software, and upload your application code.
Create an EC2 instance in the desired region and select the appropriate instance type
Configure security groups to allow traffic to and from the instance
Install necessary software and dependencies on the instance
Upload your application code to the instance
Start the application and test it
Optionally, use Elastic Load Balanc...read more
Q57. What do you mean by network.
A network is a group of interconnected devices that can communicate and share resources.
A network can be wired or wireless.
Devices on a network can share files, printers, and internet access.
Networks can be local (LAN) or wide area (WAN).
Examples of networks include the internet, home Wi-Fi, and corporate intranets.
Q58. What are the main features of opps?
OOPs stands for Object-Oriented Programming which is a programming paradigm based on the concept of objects.
Encapsulation
Inheritance
Polymorphism
Abstraction
Objects and Classes
Q59. What is array and linked list.
Array is a collection of elements of same data type. Linked list is a data structure where each element points to the next one.
Arrays have fixed size, linked lists can grow dynamically
Arrays have constant time access, linked lists have linear time access
Arrays are stored in contiguous memory, linked lists are stored in non-contiguous memory
Example of array: int[] arr = {1, 2, 3, 4, 5}
Example of linked list: Node head = new Node(1); head.next = new Node(2);
Q60. How we make a class immutable in java
To make a class immutable in Java, we need to follow certain rules.
Make the class final so that it cannot be extended
Make all the fields private and final
Do not provide any setter methods
If the class has mutable fields, return a copy of the field instead of the original in getter methods
Ensure that any mutable objects passed to the constructor are not modified outside the class
Override equals() and hashCode() methods to ensure that objects can be compared properly
Q61. What is encapsulation
Encapsulation is the process of hiding implementation details and providing a public interface for accessing the functionality.
Encapsulation helps in achieving data abstraction and information hiding
It prevents unauthorized access to the internal details of an object
It allows for easy modification of implementation without affecting the external code
Example: A class with private variables and public methods
Example: A bank account class with methods for deposit and withdraw, b...read more
Q62. What is OOPS and what are the benefits?
OOPS stands for Object-Oriented Programming System. It is a programming paradigm based on the concept of objects.
Encapsulation: Objects can encapsulate data and behavior within a single unit.
Inheritance: Objects can inherit attributes and methods from other objects.
Polymorphism: Objects can take on different forms or have multiple behaviors.
Reusability: Objects can be reused in different parts of a program.
Modularity: Objects promote modular design and code organization.
Examp...read more
Q63. How many programming languages do you know?
I am proficient in 5 programming languages.
I am proficient in Java, Python, C++, JavaScript, and SQL.
I have experience in developing web applications using JavaScript and Python frameworks.
I have worked on database management using SQL.
I have also developed desktop applications using Java and C++.
I am always eager to learn new programming languages and technologies.
Q64. Find the third number if 2 numbers from a Pythagorean triplet are given
To find the third number in a Pythagorean triplet given two numbers.
Use the Pythagorean theorem (a^2 + b^2 = c^2) to solve for the missing number.
Check if the given numbers form a Pythagorean triplet before proceeding.
The third number can be either a or b depending on which two numbers are given.
Q65. Managed code vs unmanaged code, count vs any in EF, optional parameter in c#, queries in linq
Questions related to managed vs unmanaged code, EF count vs any, optional parameters in C#, and queries in LINQ.
Managed code is compiled to Intermediate Language (IL) and executed by Common Language Runtime (CLR), while unmanaged code is directly executed by the operating system.
EF's Count() method returns the number of elements in a collection, while Any() returns a boolean indicating whether the collection contains any elements.
Optional parameters in C# allow for default va...read more
Q66. What is meant by the term of oops
OOPs stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.
OOPs is a way of organizing and designing code around objects
It emphasizes on encapsulation, inheritance, and polymorphism
It helps in creating reusable code and reduces code complexity
Examples of OOPs languages are Java, C++, Python, etc.
Q67. What is way of using excel in Ui Path ?
Excel can be used in UiPath for data manipulation and automation.
Use Excel Application Scope activity to open an Excel file
Use Read Range activity to read data from Excel
Use Write Range activity to write data to Excel
Use Filter Data Table activity to filter data in Excel
Use For Each Row activity to loop through rows in Excel
Use Excel activities in UiPath StudioX for easy automation
Example: Use UiPath to extract data from an Excel file and input it into a web form
Example: Use ...read more
Q68. Make a nested array to flat array using customised method
Convert nested array to flat array using custom method
Create a recursive function to flatten the nested array
Use Array.isArray() to check if an element is an array
Concatenate arrays using Array.concat() method
Q69. Reverse a given string Difference between array and arraylist
Reverse a given string and explain the difference between array and arraylist.
To reverse a string, we can use the built-in reverse() method or loop through the string and append each character in reverse order.
Arrays are fixed in size, while ArrayLists can dynamically grow and shrink.
Arrays can hold primitive data types and objects, while ArrayLists can only hold objects.
Arrays are faster for accessing elements, while ArrayLists are faster for inserting and deleting elements.
Q70. Difference in ordered and unordered map
Ordered map maintains the order of insertion while unordered map does not.
Ordered map is implemented as a balanced tree while unordered map is implemented as a hash table.
Ordered map has slower insertion and deletion but faster searching compared to unordered map.
Unordered map has faster insertion and deletion but slower searching compared to ordered map.
Example: std::map vs std::unordered_map in C++.
Q71. How do u handle exception in spring boot
Exceptions in Spring Boot can be handled using @ExceptionHandler, @ControllerAdvice, or custom exception classes.
Use @ExceptionHandler annotation in controller classes to handle specific exceptions
Use @ControllerAdvice annotation to define global exception handling for all controllers
Create custom exception classes by extending RuntimeException or Exception classes
Q72. What is operating system.
An operating system is a software that manages computer hardware and software resources.
It acts as an interface between the user and the computer hardware.
It provides services to applications and manages system resources.
Examples include Windows, macOS, Linux, Android, iOS.
It controls the allocation of memory, processing power, and input/output devices.
It provides security and protection to the system and user data.
Q73. Different type of testing and testing tools?
Different types of testing include unit, integration, system, acceptance, and regression testing. Testing tools include Selenium, JUnit, and TestNG.
Unit testing: testing individual units or components of code
Integration testing: testing how different units or components work together
System testing: testing the entire system as a whole
Acceptance testing: testing to ensure the system meets the requirements of the stakeholders
Regression testing: testing to ensure changes to the ...read more
Q74. What is Incidents management,change management.
Incident management is the process of identifying, analyzing, and resolving incidents to minimize their impact on business operations. Change management is the process of managing changes to IT systems to minimize disruption and ensure that changes are made in a controlled and systematic manner.
Incident management involves identifying and resolving incidents as quickly as possible to minimize their impact on business operations.
Change management involves managing changes to I...read more
Q75. Differentiate between DBMS & RDBMS
DBMS is a software to manage databases while RDBMS is a type of DBMS that uses a relational model.
DBMS stands for Database Management System while RDBMS stands for Relational Database Management System.
DBMS can manage any type of database while RDBMS uses a relational model to manage data.
DBMS does not enforce any specific data model while RDBMS enforces a tabular data model.
Examples of DBMS include MongoDB and Cassandra while examples of RDBMS include MySQL and Oracle.
Q76. How many types of loops.
There are three types of loops in programming.
The three types of loops are: for loop, while loop, and do-while loop.
For loop is used when the number of iterations is known beforehand.
While loop is used when the number of iterations is not known beforehand.
Do-while loop is similar to while loop, but it executes at least once before checking the condition.
Q77. Write SQL query to fetch table from database
SQL query to fetch table from database
Use SELECT statement to fetch data from a table
Specify the columns you want to retrieve after SELECT
Use FROM keyword followed by the table name
Q78. What are the languages you know?
I am proficient in Java, Python, C++, and JavaScript.
Java
Python
C++
JavaScript
Q79. What is storage classes in c
Storage classes in C define the scope and lifetime of variables.
There are four storage classes in C: auto, register, static, and extern.
Auto variables are local to a block and have automatic storage duration.
Register variables are stored in CPU registers for faster access.
Static variables have a lifetime throughout the program and are initialized only once.
Extern variables are declared outside any function and can be accessed by any function in the program.
Q80. Optimize the given program from O(n2) to O(log n)
Optimize O(n2) program to O(log n)
Use binary search instead of linear search
Divide and conquer approach can be used
Implement efficient data structures like heap, AVL tree, etc.
Reduce unnecessary iterations and comparisons
Use memoization to avoid redundant calculations
Q81. Who can handle any panic section
A person who remains calm and composed in high-pressure situations.
Someone with strong problem-solving skills
Ability to think clearly under pressure
Experience in handling emergencies or crises
Good communication skills to coordinate with others
Examples: Emergency responders, crisis negotiators, experienced software engineers
Q82. Difference between LINQ and SQL Query
LINQ is a language integrated query used to query data from different data sources while SQL is a query language used to query data from relational databases.
LINQ is used to query data from different data sources like arrays, collections, XML documents, and databases while SQL is used to query data from relational databases.
LINQ queries are written in C# or VB.NET while SQL queries are written in SQL.
LINQ queries are executed at runtime while SQL queries are executed at compi...read more
Q83. Explain OOPS and how have you used it
OOPS stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.
OOPS focuses on creating objects that contain both data and methods to manipulate that data.
Encapsulation, inheritance, and polymorphism are key principles of OOPS.
I have used OOPS in projects to create classes and objects, define relationships between them, and implement inheritance and polymorphism.
For example, I created a class 'Car' with properties like 'make', 'model...read more
Q84. Given a string remove the unwanted spaces
Remove unwanted spaces from a given string
Use string manipulation functions to remove extra spaces
Iterate through the string and remove any consecutive spaces
Trim the string to remove leading and trailing spaces
Q85. Explain types of network.
Types of network include LAN, WAN, MAN, WLAN, VPN, PAN, SAN, CAN, and GAN.
LAN (Local Area Network) connects devices within a small area
WAN (Wide Area Network) connects devices across a large geographical area
MAN (Metropolitan Area Network) connects devices within a city or metropolitan area
WLAN (Wireless Local Area Network) uses wireless technology to connect devices within a small area
VPN (Virtual Private Network) allows secure remote access to a private network
PAN (Personal...read more
Q86. Given a position write a code to delete a node
Code to delete a node from a given position
Identify the node to be deleted and its previous node
Update the previous node's next pointer to skip the node to be deleted
Free the memory occupied by the node to be deleted
Q87. Who is the first founder of HCL
Shiv Nadar is the first founder of HCL.
Shiv Nadar founded HCL in 1976.
He started the company with an investment of Rs. 187,000.
HCL initially focused on selling calculators before transitioning to IT services.
Q88. Length of a string without using inbuilt methods.
Iterate through each character in the string and count the number of characters.
Create a function that takes a string as input.
Initialize a counter variable to 0.
Use a loop to iterate through each character in the string and increment the counter.
Return the counter as the length of the string.
Q89. What are oops concept
OOPs concepts are the fundamental principles of object-oriented programming.
Encapsulation - binding data and functions that manipulate the data
Inheritance - creating new classes from existing ones
Polymorphism - ability of objects to take on many forms
Abstraction - hiding implementation details and showing only functionality
Q90. What is oops concept?
OOPs is a programming paradigm based on the concept of objects, which can contain data and code.
OOPs stands for Object-Oriented Programming.
It focuses on creating objects that interact with each other to solve a problem.
It includes concepts like inheritance, polymorphism, encapsulation, and abstraction.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects of different classes to be treated as if they are of the same class....read more
Q91. What is a pointer to pointer
A pointer to pointer is a variable that stores the memory address of another pointer.
It is used to store the address of a pointer variable.
It allows indirect access to a memory location.
Commonly used in dynamic memory allocation and multi-dimensional arrays.
Q92. Write a sql query to display second largest number
SQL query to display second largest number
Use the ORDER BY clause to sort the numbers in descending order
Use the LIMIT clause to retrieve the second row
Q93. What do mean by pep in python?
PEP stands for Python Enhancement Proposal, which is a document that describes a new feature or improvement for Python.
PEPs are used to propose and discuss changes to Python.
PEPs are numbered and categorized based on their type.
PEPs can be submitted by anyone in the Python community.
Examples of PEPs include PEP 8, which defines the Python style guide, and PEP 20, which outlines the Zen of Python.
Q94. What are data types in C++?
Data types in C++ are used to define the type of data a variable can hold.
C++ has built-in data types like int, float, double, char, bool, etc.
User-defined data types like struct, class, enum, etc. can also be created.
Data types determine the size and range of values that can be stored in a variable.
Data types can be used to ensure type safety and prevent errors in code.
Q95. What you know about docker>?
Docker is a platform for developing, shipping, and running applications in containers.
Docker allows you to package an application with all of its dependencies into a standardized unit called a container.
Containers are lightweight, portable, and isolated environments that can run on any machine with Docker installed.
Docker uses a client-server architecture with a Docker client communicating with a Docker daemon to build, run, and manage containers.
Docker Hub is a cloud-based r...read more
Q96. what is inheitence with example
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
Derived class can override inherited methods or add new methods
Example: Class 'Animal' can be a base class with properties like 'name' and methods like 'eat'. Class 'Dog' can inherit from 'Animal' and add a method 'bark'.
Q97. What are oops concepts !?
Object-oriented programming concepts that help in organizing and structuring code for better reusability and maintainability.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
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 necessary features to t...read more
Q98. inheritance and its types
Inheritance is a mechanism in object-oriented programming where a class inherits properties and behaviors from another class.
Inheritance allows code reuse and promotes code organization.
There are different types of inheritance: single, multiple, multilevel, hierarchical, and hybrid.
Single inheritance involves a class inheriting from a single base class.
Multiple inheritance involves a class inheriting from multiple base classes.
Multilevel inheritance involves a class inheritin...read more
Q99. Will you be able to provide prod support
Yes, I am capable of providing prod support.
I have experience in troubleshooting and resolving production issues.
I am familiar with monitoring tools like Nagios and New Relic.
I am comfortable working in a fast-paced environment and can handle multiple tasks simultaneously.
Q100. Which compiler we are using in c C data types
The choice of compiler in C depends on the platform and the specific needs of the project.
Different platforms may have different default compilers, such as GCC on Linux and Clang on macOS.
Some projects may require a specific compiler for compatibility or performance reasons.
C compilers include GCC, Clang, Microsoft Visual C++, and Intel C++ Compiler, among others.
Top HR Questions asked in null
Interview Process at null
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month