TCS
100+ Ardee Engineering Company Interview Questions and Answers
Q101. 1. Find if a number belongs to a Fibonacci series
Check if a number belongs to Fibonacci series
Check if the given number is a perfect square
If yes, check if 5*n^2 + 4 or 5*n^2 - 4 is a perfect square
If yes, then the number belongs to Fibonacci series
Q102. What is abstraction in Java?
Abstraction in Java is the concept of hiding the implementation details and showing only the necessary features of an object.
Abstraction allows you to define the structure of an object without specifying the implementation details.
Abstract classes and interfaces are used to achieve abstraction in Java.
Abstract classes can have both abstract and concrete methods, while interfaces can only have abstract methods.
Example: abstract class Animal { abstract void makeSound(); }
Exampl...read more
Q103. 3.Write a program to find number is prime or not
A program to determine if a given number is prime or not.
Iterate from 2 to the square root of the number and check if it divides the number evenly
If any number divides the given number evenly, it is not prime
If no number divides the given number evenly, it is prime
Q104. Write a query to join two db tables
Query to join two database tables
Use the JOIN keyword in SQL to combine rows from two tables based on a related column
Specify the columns to be joined on using the ON keyword
Common types of joins include INNER JOIN, LEFT JOIN, and RIGHT JOIN
Q105. diff b/w protractor and selenium
Protractor is a testing framework specifically for Angular applications, while Selenium is a general-purpose testing tool for web applications.
Protractor is built on top of WebDriverJS and is designed to test Angular applications.
Selenium is a standalone testing tool that supports multiple programming languages and browsers.
Protractor has built-in support for Angular-specific locator strategies like ng-model, ng-binding, etc.
Selenium requires additional setup and configuratio...read more
Q106. Difference between ArrayList and LinkedList
ArrayList is implemented using a dynamic array while LinkedList is implemented using a doubly linked list.
ArrayList provides fast random access but slow insertion and deletion. LinkedList provides fast insertion and deletion but slow random access.
ArrayList uses more memory as it needs to allocate space for the entire array. LinkedList uses less memory as it only needs to store the elements and references.
Example: ArrayList is suitable for scenarios where random access is fre...read more
Q107. Explain the concepts of OOPs
OOPs stands for Object-Oriented Programming concepts which include encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object).
Inheritance: Ability of a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary features of ...read more
Q108. Explain about clouds and IoT
Clouds and IoT are interconnected technologies that work together to enable data storage, processing, and communication for Internet-connected devices.
Cloud computing provides the infrastructure and resources needed for IoT devices to store and process data.
IoT devices collect and transmit data to the cloud for storage and analysis.
Cloud platforms offer scalability and flexibility for IoT applications, allowing for efficient data management and processing.
Examples include usi...read more
Q109. Find depth of a tree, write pseudocode.
Calculate the depth of a tree using pseudocode.
Traverse the tree recursively and keep track of the depth at each level
Return the maximum depth found
Pseudocode: function findDepth(node) { if node is null, return 0; return 1 + max(findDepth(node.left), findDepth(node.right)); }
Q110. Why string is immutable
String is immutable in Java to ensure data integrity and security.
Immutable strings prevent accidental changes to data
String pooling reduces memory usage by reusing common strings
Security - sensitive information cannot be modified once set
Q111. functon of the MODEM
A modem is a device that modulates and demodulates signals to enable communication between devices over a network.
Modulates digital signals into analog signals for transmission over telephone lines
Demodulates analog signals back into digital signals for use by the receiving device
Can be used for dial-up internet connections or to connect to a local area network (LAN)
Examples include cable modems, DSL modems, and wireless modems
Q112. What is cloud computing?
Cloud computing is the delivery of computing services over the internet.
Cloud computing allows users to access and use computing resources on-demand, such as storage, processing power, and software applications.
It eliminates the need for users to own and maintain physical infrastructure, as the resources are provided by a third-party service provider.
Examples of cloud computing services include Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform.
Q113. DSA - design binary search tree
Design a binary search tree (BST) to efficiently store and retrieve data in a sorted manner.
Start with a root node and insert new nodes based on their values compared to existing nodes.
Left child nodes should have values less than their parent node, while right child nodes should have values greater.
Implement functions for insertion, deletion, and searching in the BST.
Balancing the tree can improve performance by ensuring it remains relatively balanced.
Example: Inserting valu...read more
Q114. what is multithreading
Multithreading is a programming concept where multiple threads within a process execute independently to improve performance.
Allows for concurrent execution of multiple tasks within a single process
Improves performance by utilizing multiple CPU cores
Requires careful synchronization to avoid race conditions
Examples include web servers handling multiple client requests simultaneously
Q115. What are stored procedures
Stored procedures are precompiled SQL queries stored in a database for reuse.
Stored procedures are used to perform a specific task or set of tasks in a database.
They can accept input parameters and return results.
Stored procedures can improve performance by reducing network traffic and optimizing query execution.
Examples include procedures for inserting, updating, or deleting data in a database.
Q116. Do you have any backlogs
NO
I do not have any backlogs
I have completed all my courses and projects on time
I have a clean academic record
Q117. Explain Opps concept and described each
Object-oriented programming (OOP) is a programming paradigm that uses objects to represent and manipulate data.
OOP is based on the concept of classes and objects.
Encapsulation is the process of hiding the internal details of an object and providing access only through methods.
Inheritance allows classes to inherit properties and methods from other classes.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
Abstraction is the process...read more
Q118. Print dictionary in python?
Use Python's print function to display a dictionary.
Use the print function with the dictionary as the argument.
The dictionary will be displayed in key-value pairs.
You can also use a loop to print each key-value pair individually.
Q119. Exception handling in Java?
Exception handling in Java is a mechanism to handle runtime errors and prevent program crashes.
Use try-catch blocks to handle exceptions
Use finally block to execute code regardless of exception
Use throw keyword to manually throw exceptions
Use throws keyword in method signature to declare exceptions that can be thrown
Q120. Write program for Fibonacci series
Program to generate Fibonacci series
Declare variables for first two numbers in series
Loop through desired number of iterations
Calculate next number in series by adding previous two
Print or store each number in series
Q121. JUMP GAME 1-D DP ON ARRAYS
Using dynamic programming to solve the jump game problem on arrays.
Create a DP array to store if it is possible to reach each index from the start.
Iterate through the array and update the DP array based on the maximum reachable index.
Return true if the last index is reachable, false otherwise.
Q122. What is super keyword
Super keyword is used to refer to the parent class constructor or method.
Used in inheritance to call parent class constructor
Used to access parent class variables and methods
Can be used with 'this' keyword to call overloaded constructor
Q123. Array sorting use different approach
Array sorting can be done using different algorithms like bubble sort, merge sort, quick sort, etc.
Bubble sort compares adjacent elements and swaps them if they are in the wrong order.
Merge sort divides the array into two halves, sorts them separately, and then merges them.
Quick sort picks a pivot element and partitions the array around the pivot.
Example: Sorting an array of strings alphabetically using merge sort.
Q124. Explain more about cloud computing
Cloud computing is the delivery of computing services over the internet, including storage, servers, databases, networking, software, and more.
Cloud computing allows users to access and use resources on-demand without the need for physical infrastructure.
It offers scalability, flexibility, cost-effectiveness, and the ability to access resources from anywhere with an internet connection.
Examples of cloud computing services include Amazon Web Services (AWS), Microsoft Azure, Go...read more
Q125. What are functions
Functions are blocks of code that perform a specific task and can be called multiple times within a program.
Functions help in organizing code by breaking it into smaller, manageable parts.
They improve code reusability by allowing the same block of code to be used in multiple places.
Functions can take input parameters and return output values.
Examples: summing two numbers, finding the maximum value in an array, printing a message to the console.
Q126. what is a class
A class is a blueprint for creating objects in object-oriented programming.
A class defines the properties and behaviors of objects.
Objects are instances of a class.
Classes can inherit properties and behaviors from other classes.
Encapsulation, inheritance, and polymorphism are key concepts in class-based programming.
Q127. what is a process
A process is a series of actions or steps taken to achieve a particular goal or outcome.
A process typically has a defined beginning and end.
It involves a sequence of tasks or activities that are interconnected.
Processes can be linear or iterative, depending on the nature of the goal.
Examples include software development process, manufacturing process, and decision-making process.
Q128. Explain solid principles an detail
The SOLID principles are a set of design principles that help in creating maintainable and scalable software systems.
S - Single Responsibility Principle: A class should have only one reason to change.
O - Open-Closed Principle: Software entities should be open for extension but closed for modification.
L - Liskov Substitution Principle: Subtypes must be substitutable for their base types.
I - Interface Segregation Principle: Clients should not be forced to depend on interfaces t...read more
Q129. diff between C++ and Python
C++ is a statically typed language with high performance, while Python is dynamically typed with simpler syntax.
C++ is statically typed, while Python is dynamically typed
C++ is compiled, while Python is interpreted
C++ is better for performance-critical applications, while Python is better for rapid development
C++ requires explicit memory management, while Python has automatic memory management
C++ is used for system programming, game development, etc., while Python is used for...read more
Q130. diff types polymorphism.
Polymorphism in programming refers to the ability of a single function or method to operate on different types of data.
Types of polymorphism include compile-time polymorphism (function overloading) and runtime polymorphism (function overriding)
Compile-time polymorphism is achieved through method overloading, where multiple methods have the same name but different parameters
Runtime polymorphism is achieved through method overriding, where a subclass provides a specific impleme...read more
Q131. Internal Working of HashMap
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
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 index and then the linked list is searched for the ...read more
Q132. What is the heap
The heap is a region of a computer's memory used for dynamic memory allocation.
The heap is managed by the operating system and is separate from the stack.
Memory allocated on the heap must be explicitly deallocated to prevent memory leaks.
Common functions for heap memory management include malloc, calloc, realloc, and free.
Q133. Projects done and explanation
I have worked on multiple projects including network infrastructure setup, cloud migration, and software development.
Setup network infrastructure for a small business using Cisco routers and switches
Migrated on-premise servers to AWS cloud using EC2 instances and S3 storage
Developed a web application using Python and Django framework for a client
Implemented disaster recovery plan for a financial institution using VMware Site Recovery Manager
Designed and deployed a VoIP phone ...read more
Q134. HEIGHT OF BINARY TREE
The height of a binary tree is the number of edges on the longest path from the root node to a leaf node.
Height of an empty tree is 0.
Height of a tree with only one node is 1.
Height of a binary tree can be calculated recursively by finding the height of the left and right subtrees and adding 1 to the maximum of the two heights.
Q135. 4. Design url shortner
A URL shortener is a tool that takes a long URL and creates a shorter, more manageable link.
Generate a unique short code for each long URL
Store the short code and long URL in a database
Redirect users to the long URL when they visit the short URL
Track clicks and provide analytics for each short URL
Q136. explain types of oops concepts
Object-oriented programming concepts include 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.
Q137. Difference between jdk and jvm
JDK is a development kit that includes JVM, while JVM is a virtual machine that executes Java code.
JDK stands for Java Development Kit and includes tools for developing and compiling Java programs
JVM stands for Java Virtual Machine and is responsible for executing Java code
JDK includes JVM, along with other tools such as javac, jar, and javadoc
JVM is platform-dependent, while JDK is platform-independent
JDK is required for developing Java applications, while JVM is required fo...read more
Q138. 2.Difference between c and c++
C is a procedural programming language while C++ is a combination of procedural and object-oriented programming language.
C is a procedural programming language while C++ is a combination of procedural and object-oriented programming language.
C does not support classes and objects while C++ does.
C does not have function overloading and namespaces like C++.
C does not have exception handling like C++.
C does not have references like C++.
Q139. action class describe
Action class in Java is used to encapsulate the request processing logic in a separate class.
Action class is a part of the Apache Struts framework in Java.
It is responsible for handling the user's request and generating the response.
Action class contains the execute() method which is invoked by the framework to process the request.
It helps in separating the business logic from the presentation logic.
Example: public class LoginAction extends Action { }
Q140. Oops concepts in java
Oops concepts in Java
Encapsulation: bundling data and methods together
Inheritance: creating new classes from existing ones
Polymorphism: using a single interface to represent different forms
Abstraction: hiding implementation details and providing only essential information
Q141. Working of Linked list
A linked list is a data structure that consists of a sequence of nodes, where each node contains a reference to the next node.
Linked list is a dynamic data structure.
Each node in a linked list contains two parts: data and a reference to the next node.
The last node in a linked list points to null.
Insertion and deletion operations are efficient in a linked list compared to an array.
Traversal in a linked list starts from the head node and follows the next references until the en...read more
Q142. Kth Element in a BST
Finding the Kth element in a Binary Search Tree (BST)
Inorder traversal of BST gives elements in sorted order
Use recursive or iterative approach to find Kth element
Keep track of count of nodes visited to find Kth element
Q143. hashmap working
HashMap is a data structure that stores key-value pairs and allows for fast retrieval of values based on keys.
HashMap uses hashing to store and retrieve key-value pairs efficiently.
Keys in a HashMap must be unique, but values can be duplicated.
HashMap allows for null keys and null values.
Example: HashMap
map = new HashMap<>(); map.put("apple", 5); int value = map.get("apple");
More about working at TCS
Top HR Questions asked in Ardee Engineering Company
Interview Process at Ardee Engineering Company
Top System Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month