HCLTech
100+ Amazon Interview Questions and Answers
Q101. 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.
Q102. Write program for spiral traversal of matrix
Program to traverse matrix in spiral order
Initialize variables for top, bottom, left, right boundaries
Iterate through matrix in spiral order, updating boundaries
Handle edge cases for odd/even rows and columns
Example: [[1, 2, 3], [4, 5, 6], [7, 8, 9]] should output [1, 2, 3, 6, 9, 8, 7, 4, 5]
Q103. Explain devops technology you have worked
I have worked with various DevOps technologies including Docker, Jenkins, and Kubernetes.
Experience with Docker for containerization and creating reproducible environments
Proficient in Jenkins for continuous integration and deployment
Familiarity with Kubernetes for container orchestration and scaling
Implemented CI/CD pipelines to automate software delivery processes
Used configuration management tools like Ansible for infrastructure automation
Q104. Difference between union and union all
Union combines and removes duplicates, Union All combines all rows including duplicates.
Union removes duplicate rows, Union All does not.
Union is slower as it has to remove duplicates, Union All is faster.
Union requires both queries to have the same number of columns and compatible data types.
Q105. modes of working and general behaviour
Modes of working and general behavior are important for a software engineer to be productive and efficient.
Being organized and prioritizing tasks
Collaborating with team members and communicating effectively
Being adaptable and open to learning new technologies
Maintaining a positive attitude and being proactive in problem-solving
Following coding best practices and maintaining code quality
Being accountable and taking ownership of tasks
Maintaining work-life balance and avoiding b...read more
Q106. What is a Class structure?
A class structure is a blueprint for creating objects that have similar properties and behaviors.
A class is a user-defined data type that encapsulates data and functions.
It defines the properties and methods that objects of that class will have.
Objects are instances of a class, and they can be created and manipulated using the class structure.
Inheritance allows classes to inherit properties and methods from other classes.
Polymorphism allows objects of different classes to be ...read more
Q107. Tell me about oops concept?
OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of objects.
OOPs focuses on creating objects that contain both data and functions.
Encapsulation, inheritance, and polymorphism are the three main pillars of OOPs.
Encapsulation refers to the practice of hiding data and functions within an object.
Inheritance allows objects to inherit properties and methods from other objects.
Polymorphism allows objects to take on multiple forms or behaviors.
Example...read more
Q108. Thread and its types
Thread is a lightweight process that can run concurrently with other threads in a program.
There are two types of threads: user-level threads and kernel-level threads.
User-level threads are managed by the application and are faster to create and switch between, but can't take advantage of multiple processors.
Kernel-level threads are managed by the operating system and can take advantage of multiple processors, but are slower to create and switch between.
Examples of thread libr...read more
Q109. What is database?
A database is a structured collection of data that is organized and managed to provide efficient storage, retrieval, and manipulation of data.
A database is used to store and manage large amounts of data.
It provides a way to organize and structure data for easy access and retrieval.
Databases can be relational, object-oriented, or hierarchical, depending on the data model used.
They support various operations like inserting, updating, deleting, and querying data.
Examples of data...read more
Q110. What is LINQ?
LINQ is a set of extensions to the .NET Framework that allows developers to query data from different sources using a unified syntax.
LINQ stands for Language Integrated Query
It allows querying data from different sources like SQL databases, XML documents, and collections using a common syntax
It supports both query syntax and method syntax
It provides a set of standard query operators like Where, Select, OrderBy, GroupBy, etc.
LINQ queries are strongly typed and can be checked a...read more
Q111. Which technology you wordked
I have worked with a variety of technologies including Java, Python, SQL, and JavaScript.
Java
Python
SQL
JavaScript
Q112. What are the ooops concepts
Object-oriented programming principles including inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary features.
Q113. What is Virtual Dom in Reac Js
Virtual DOM is a lightweight copy of the actual DOM in React JS, used for efficient updates and rendering.
Virtual DOM is a concept where a lightweight copy of the actual DOM is created in memory.
When changes are made to the UI in React, the Virtual DOM is updated instead of the actual DOM.
React then compares the Virtual DOM with the actual DOM and only updates the necessary parts, making the process more efficient.
This helps in improving performance by reducing the number of ...read more
Q114. Write a c program on fractional numbers
A C program to perform arithmetic operations on fractional numbers.
Use float or double data type to store fractional numbers.
Use scanf() to take input from the user.
Perform arithmetic operations like addition, subtraction, multiplication, and division.
Use printf() to display the result.
Q115. Polymorphism and its types
Polymorphism is the ability of an object to take on many forms. It has two types: compile-time and runtime polymorphism.
Compile-time polymorphism is achieved through function overloading and operator overloading.
Runtime polymorphism is achieved through virtual functions and function overriding.
Polymorphism allows for code reusability and flexibility in object-oriented programming.
Example of compile-time polymorphism: function overloading - multiple functions with the same nam...read more
Q116. What is method by overriding
Method overriding is a feature of object-oriented programming where a subclass provides a specific implementation of a method that is already provided by its parent class.
Method overriding is used to achieve runtime polymorphism.
The method signature of the overriding method must match the method being overridden in the parent class.
The access level of the overriding method cannot be more restrictive than the access level of the method being overridden.
Example: class B extends...read more
Q117. What is multithreading
Multithreading is the ability of a CPU to execute multiple threads concurrently, allowing for better performance and responsiveness in software applications.
Multithreading allows multiple threads to run concurrently within the same process.
Each thread has its own stack and program counter, but shares the same memory space.
Multithreading is commonly used in applications that require handling multiple tasks simultaneously, such as web servers or video games.
Q118. What is collection in java
Collections in Java are classes that represent groups of objects, providing operations to manipulate and access the elements.
Collections provide a way to store, manipulate, and retrieve groups of objects in Java.
Some common collection classes in Java include ArrayList, LinkedList, HashMap, and TreeSet.
Collections framework in Java includes interfaces like List, Set, Map, and Queue, along with their respective implementations.
Q119. Give an example on Polymorphism.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
Polymorphism allows for method overriding, where a subclass can provide a specific implementation of a method that is already defined in its superclass.
Example: Animal superclass with methods like eat() and sleep(). Subclasses like Dog and Cat can override these methods with their own implementations.
Polymorphism also allows for method overloading, where multiple methods with the ...read more
Q120. Different between hashmap and hashset
Hashmap is a key-value pair data structure while Hashset is a collection of unique elements.
Hashmap allows duplicate values but not duplicate keys while Hashset only allows unique elements.
Hashmap is implemented using a combination of hash table and linked list while Hashset is implemented using only hash table.
Hashmap is used to store data in key-value pairs while Hashset is used to store a set of unique elements.
Example: Hashmap can be used to store a dictionary where each ...read more
Q121. What is Queue ?
A Queue is a linear data structure that follows the FIFO (First In First Out) principle.
Elements are added to the rear end and removed from the front end.
Common operations include enqueue (add element) and dequeue (remove element).
Used in scheduling, buffering, and breadth-first search algorithms.
Examples include printer queues, message queues, and task queues.
Q122. Explanation from oops principles
Explanation of OOP principles
OOP stands for Object-Oriented Programming
It emphasizes on objects and classes
Encapsulation, Inheritance, and Polymorphism are the three main principles of OOP
Encapsulation is the process of hiding data and methods within a class
Inheritance allows a class to inherit properties and methods from another class
Polymorphism allows objects to take on multiple forms or behaviors
Q123. Explain the logic of written program
The logic of a written program refers to the sequence of steps and conditions that determine how the program functions.
Identify the main goal or purpose of the program
Break down the problem into smaller tasks or functions
Use conditional statements and loops to control the flow of the program
Implement algorithms and data structures to solve specific problems
Test the program to ensure it functions correctly
Q124. what is java basic oops
Java basic OOPs concepts include classes, objects, inheritance, polymorphism, and encapsulation.
Classes are blueprints for objects
Objects are instances of classes
Inheritance allows a class to inherit properties and behavior from another class
Polymorphism allows objects of different classes to be treated as objects of a common superclass
Encapsulation hides the internal state of an object and only exposes necessary functionality
Q125. What is promises in Javascript
Promises in JavaScript are objects representing the eventual completion or failure of an asynchronous operation.
Promises are used to handle asynchronous operations in JavaScript.
They can be in one of three states: pending, fulfilled, or rejected.
Promises can be chained using .then() method to handle success and failure.
Example: const myPromise = new Promise((resolve, reject) => { ... });
Q126. bugs found during testing
Bugs found during testing
Bugs are inevitable in software development
Testing helps to identify and fix bugs before release
Different types of bugs include functional, performance, and security issues
Bug tracking tools like JIRA can help manage and prioritize bug fixes
Q127. Oops concepts in . NET and SQL
Oops concepts are applicable in both .NET and SQL for better code organization and maintenance.
Encapsulation: Hiding implementation details and exposing only necessary information.
Inheritance: Reusing code and creating a hierarchy of classes.
Polymorphism: Using a single interface to represent multiple types of objects.
Abstraction: Focusing on essential features and ignoring implementation details.
Examples in .NET: Abstract classes, interfaces, inheritance, polymorphism.
Exampl...read more
Q128. Explain about Django MVC architechture?
Django follows the Model-View-Controller (MVC) architecture pattern for organizing code.
Model: Represents the data structure and handles database operations.
View: Handles user interface logic and renders templates.
Controller: Acts as a bridge between the Model and View, processing user requests and returning responses.
Q129. Difference between put and patch
PUT updates or replaces an entire resource, while PATCH updates only the specified fields.
PUT is idempotent, while PATCH is not
PUT requires the entire resource to be sent, while PATCH only requires the updated fields
PUT replaces the entire resource, while PATCH modifies only the specified fields
PUT is used to create a new resource if it doesn't exist, while PATCH is not
Example: PUT /users/1 replaces the entire user resource with ID 1, while PATCH /users/1 only updates the spe...read more
Q130. Explain RE Framwork architecture
RE Framework is a template for building scalable and robust automation frameworks in UiPath.
RE stands for Robotic Enterprise Framework
It follows a layered architecture with modular components
It includes features like exception handling, logging, and reporting
It uses state machines to manage the workflow
It supports both linear and non-linear workflows
Q131. What is selector ?
A selector is a pattern used to select elements from the DOM based on their attributes, properties, and values.
Selectors are used in CSS to style HTML elements.
Selectors can be based on element type, class, ID, attribute, or pseudo-class.
Examples of selectors include: #id, .class, element, [attribute=value], :hover.
Selectors can also be used in JavaScript to manipulate DOM elements.
Q132. difference between array and arraylist?
Array is a fixed-size data structure while ArrayList is a dynamic-size data structure in Java.
Array is a fixed-size collection of elements of the same data type.
ArrayList is a dynamic-size collection of elements that can grow or shrink in size.
Arrays can store primitive data types and objects, while ArrayList can only store objects.
Arrays require a specified size during initialization, while ArrayList can dynamically resize itself.
Example: String[] names = new String[5]; Arra...read more
Q133. Tell me about Spring boot
Spring Boot is a framework that simplifies the development of Java applications by providing a pre-configured environment.
Spring Boot is built on top of the Spring framework and follows the convention over configuration principle.
It provides a standalone executable JAR file that includes an embedded server, making it easy to deploy and run applications.
Spring Boot offers auto-configuration, which automatically configures the application based on the dependencies added to the ...read more
Q134. Who is chairman of HCL
Shiv Nadar is the chairman of HCL Technologies.
Shiv Nadar founded HCL Technologies in 1976.
He has been serving as the chairman of the company since its inception.
Under his leadership, HCL has grown to become one of the leading IT services companies globally.
Q135. What is a pointer
A pointer is a variable that stores the memory address of another variable.
Pointers are used to indirectly access and manipulate data in memory.
They are commonly used in programming languages like C and C++.
Example: int *ptr; // declares a pointer to an integer variable
Q136. what is oops ?
Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and code.
OOP focuses on creating objects that interact with each other to solve problems
It involves concepts like classes, objects, inheritance, polymorphism, and encapsulation
Example: In a banking system, you can have classes like Account, Customer, and Transaction
Q137. Explain about collection frame work
Collection framework in Java provides a set of interfaces and classes to store and manipulate groups of objects.
Provides interfaces like List, Set, Map for different types of collections
Includes classes like ArrayList, LinkedList, HashSet, HashMap for implementing collections
Allows easy manipulation, iteration, and sorting of collections
Example: List
names = new ArrayList<>(); names.add("Alice");
Q138. Find substrings
Finding substrings in an array of strings
Iterate through each string in the array
Use string methods to find substrings within each string
Store the substrings in a separate array
Q139. What is actuator ?
An actuator is a device that converts electrical signals into physical motion or force.
Actuators are commonly used in various systems to control and manipulate physical processes.
They can be found in robotics, automotive systems, HVAC systems, and many other applications.
Examples of actuators include electric motors, solenoids, hydraulic cylinders, and pneumatic valves.
Q140. Write program of prime number
Program to find prime numbers
Iterate through numbers from 2 to n
Check if number is divisible by any number from 2 to its square root
If not divisible, it is a prime number
Q141. Current CTC and expected?
Current CTC is confidential, expected salary is based on market standards and my experience.
Current CTC is confidential information and not typically disclosed during interviews.
Expected salary is based on market standards, my experience, and the responsibilities of the role.
It is important to research industry standards and salary ranges before discussing expected salary.
Example: My current CTC is confidential, but based on my experience and the market standards, I am lookin...read more
Q142. What is Polymorphism
Polymorphism is the ability of a function or method to behave differently based on the object it is acting upon.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
It enables a single interface to be used for different data types or classes.
Examples include method overloading and method overriding in object-oriented programming.
Q143. What is inheritance
Inheritance is a concept in object-oriented programming where a class inherits attributes and methods 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
Q144. what is OOP in java?
OOP in Java stands for Object-Oriented Programming, a programming paradigm that uses objects to design applications.
OOP in Java involves creating classes and objects, encapsulation, inheritance, and polymorphism.
Classes are blueprints for objects, defining their attributes and behaviors.
Encapsulation hides the internal state of an object and only allows access through methods.
Inheritance allows a class to inherit attributes and methods from another class.
Polymorphism allows o...read more
Q145. Difference between Groupby and Orderby.
Groupby is used to group data based on a specific column, while Orderby is used to sort data based on a specific column.
Groupby is used to create groups of data based on a specific column.
Orderby is used to sort data based on a specific column in ascending or descending order.
Groupby is often used in combination with aggregate functions like sum, count, etc.
Orderby can be used to sort data in ascending or descending order.
Groupby is commonly used in SQL queries, while Orderby...read more
Q146. Difference b/w delete, truncate, drop
Delete removes specific rows from a table, truncate removes all rows, and drop removes the entire table.
Delete is a DML operation, while truncate and drop are DDL operations.
Delete can be rolled back, while truncate and drop cannot be rolled back.
Delete operation maintains the transaction log, while truncate and drop do not.
Delete operation is slower compared to truncate and drop.
Example: DELETE FROM table_name WHERE condition;
Example: TRUNCATE TABLE table_name;
Example: DROP ...read more
Q147. Explain OOPS
OOPS stands for Object-Oriented Programming System. It is a programming paradigm based on the concept of objects.
OOPS is based on four main concepts: encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation refers to the practice of hiding the internal details of an object from the outside world.
Inheritance allows a new class to be based on an existing class, inheriting its properties and methods.
Polymorphism allows objects of different classes to be treated as...read more
Q148. Difference between ++x and x++
++x increments the value of x and then returns the incremented value, while x++ returns the current value of x and then increments it.
++x is a pre-increment operator, it increments the value of x and then returns the incremented value
x++ is a post-increment operator, it returns the current value of x and then increments it
Example: int x = 5; int y = ++x; // x is now 6, y is 6
Example: int x = 5; int y = x++; // x is now 6, y is 5
Q149. what is oops in Java
Object-oriented programming paradigm in Java focusing on classes and objects
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
Q150. Explain about Python OOps?
Python OOPs refers to Object-Oriented Programming concepts in Python, including classes, objects, inheritance, encapsulation, and polymorphism.
Python supports OOP principles such as classes and objects.
Classes are blueprints for creating objects with attributes and methods.
Inheritance allows a class to inherit attributes and methods from another class.
Encapsulation restricts access to certain components of an object.
Polymorphism enables objects to be treated as instances of t...read more
Q151. Encapsulation explain
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit, known as a class.
Encapsulation helps in hiding the internal state of an object and restricting access to it.
It allows for better control over the data by preventing external code from directly modifying it.
Encapsulation also promotes code reusability and modularity by grouping related functionalities together.
For example, a class 'Car' may encapsulate data such as 'make', 'm...read more
Q152. Brief description of interface
An interface is a contract between two systems or components that defines the methods, parameters, and return types that the system or component must implement.
Interfaces provide a way to achieve abstraction and loose coupling in software design.
They allow for polymorphism and can be used to create reusable code.
Examples of interfaces in Java include the Comparable interface and the Serializable interface.
Q153. Call by reference with example
Call by reference is a method of passing arguments to a function by reference.
In call by reference, the memory address of the variable is passed to the function.
Any changes made to the parameter inside the function will reflect in the original variable.
Example: void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
Example: int main() { int x = 10, y = 20; swap(&x, &y); // x = 20, y = 10 }
Q154. Features of Ansible Tower
Ansible Tower is a web-based UI and automation platform for managing Ansible automation at scale.
Provides a centralized dashboard for managing Ansible automation
Allows for role-based access control and team collaboration
Offers job scheduling, notifications, and reporting
Integrates with other tools like Jenkins, Git, and AWS
Supports RESTful API for automation and integration
Enables self-service automation for non-technical users
Q155. Explain about Oops concept
Oops concept stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.
Oops concept focuses on creating objects that contain data in the form of fields (attributes) and code in the form of procedures (methods).
Encapsulation, inheritance, polymorphism, and abstraction are the four main principles of Oops concept.
Encapsulation refers to the bundling of data with the methods that operate on that data within a class.
Inheritance allows a ...read more
Q156. Annotations in spring boot
Annotations in Spring Boot are used to simplify the configuration and development of applications.
Annotations are used to provide metadata about the code
They can be used to define the behavior of classes, methods, and fields
Annotations in Spring Boot are used for dependency injection, mapping requests, and defining REST endpoints
Q157. Reverse a linked list
Reverse a linked list by changing the direction of pointers
Start with three pointers: current, previous, and next
Iterate through the linked list, updating pointers to reverse the direction
Update the head of the linked list to the last node as the new head
Q158. Difference between tcp and udp
TCP is connection-oriented, reliable, and slower, while UDP is connectionless, unreliable, and faster.
TCP is connection-oriented, meaning it establishes a connection before sending data.
TCP is reliable, as it ensures all data is received in the correct order.
TCP is slower due to the overhead of establishing and maintaining connections.
UDP is connectionless, meaning it does not establish a connection before sending data.
UDP is unreliable, as it does not guarantee delivery or o...read more
Q159. Data Structures algorithm
Data structures algorithm is a way of organizing and storing data in a computer so that it can be accessed and used efficiently.
Data structures are used to store and organize data in a way that allows for efficient access and modification.
Common data structures include arrays, linked lists, stacks, queues, trees, and graphs.
Algorithms are used to manipulate data structures to perform operations such as searching, sorting, and inserting.
Choosing the right data structure and al...read more
Q160. Advantages of stored procedure
Stored procedures provide faster execution, improved security, and easier maintenance.
Stored procedures reduce network traffic by executing on the server.
They can be pre-compiled for faster execution.
They provide better security by allowing access only through the procedure.
They simplify maintenance by centralizing code.
They can be reused across multiple applications.
They can improve performance by reducing the amount of data sent over the network.
Q161. features of OOPs
Features of OOP include encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object).
Inheritance: Ability to create new classes based on existing classes, inheriting their attributes and methods.
Polymorphism: Ability for objects of different classes to respond to the same message in different ways.
Abstraction: Hiding the complex implementation details and showing only the necessary feat...read more
Q162. Running a webservice
Running a webservice involves deploying the service on a server and ensuring it is accessible to clients.
Choose a web server software like Apache or Nginx to host the webservice
Deploy the service on a server with sufficient resources and bandwidth
Configure the server to listen on the appropriate port for incoming requests
Monitor the server for performance issues and scale as needed
Use tools like Postman or curl to test the webservice endpoints
Q163. Full form of HCL
HCL stands for Hindustan Computers Limited, an Indian multinational IT services company.
HCL stands for Hindustan Computers Limited
It is an Indian multinational IT services company
Founded in 1976 by Shiv Nadar
Q164. Languages known
Proficient in Java, Python, and C++
Java
Python
C++
Top HR Questions asked in Amazon
Interview Process at Amazon
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month