TCS
60+ Aequs Interview Questions and Answers
Q1. #include int main() { int any = ' ' * 10; printf("%d", any); return 0; } What is the output?
The program outputs 320, which is the ASCII value of space multiplied by 10.
The variable 'any' is assigned the value of ' ' (space) multiplied by 10, which is 320 in ASCII.
The printf statement outputs the value of 'any', which is 320.
The #include statement is not relevant to the output of the program.
Q2. Compute the nearest larger number by interchanging its digits updated.Given 2 numbers a and b find the smallest number greater than b by interchanging the digits of a and if not possible print -1.
Compute the nearest larger number by interchanging its digits.
Given two numbers a and b
Find the smallest number greater than b by interchanging the digits of a
If not possible, print -1
Q3. Write a program to find a number that is palindrome or not ?
Program to check if a number is palindrome or not.
Convert the number to a string
Reverse the string
Compare the reversed string with the original string
If they are equal, the number is a palindrome
Q4. Basic print function of python and OOPS concept explanation
Python's print function and OOPS concept explanation
The print() function is used to display output on the console
It can take multiple arguments separated by commas
OOPS stands for Object-Oriented Programming System
It is a programming paradigm based on the concept of objects
Objects have properties (attributes) and methods (functions)
Encapsulation, inheritance, and polymorphism are key OOPS concepts
Q5. Write a sql query to find all records whose base branch city is kolkata and haven't been allocated to projects
SQL query to find records with base branch city Kolkata and not allocated to projects
Use SELECT statement to retrieve data from table
Use WHERE clause to filter records with base branch city Kolkata
Use LEFT JOIN to join table with project allocation table
Use IS NULL condition to filter records not allocated to projects
Q6. Principles of oops and explain agile methodologies and explain uses of stack and basic web development questions
Answering questions on OOPs principles, agile methodologies, stack uses, and basic web development.
OOPs principles include encapsulation, inheritance, and polymorphism
Agile methodologies involve iterative and incremental development
Stack is a data structure that follows LIFO principle
Basic web development questions may include HTML, CSS, and JavaScript
HTML is used for creating the structure of a web page
CSS is used for styling the web page
JavaScript is used for adding interac...read more
Q7. What is polymorphism in java and its types?
Polymorphism is the ability of an object to take on many forms. In Java, it is achieved through method overloading and overriding.
Polymorphism allows objects to be treated as if they are of multiple types.
Method overloading is a type of polymorphism where multiple methods have the same name but different parameters.
Method overriding is a type of polymorphism where a subclass provides its own implementation of a method that is already defined in its superclass.
Polymorphism is ...read more
Q8. What is the difference between list and tuples
Lists are mutable while tuples are immutable in Python.
Lists use square brackets [] while tuples use parentheses ().
Elements in a list can be added, removed, or modified while tuples cannot be modified.
Lists are used for collections of homogeneous items while tuples are used for heterogeneous items.
Lists are slower than tuples in terms of performance.
Example of a list: [1, 2, 3] and example of a tuple: (1, 'apple', True).
Q9. What is the difference between method overloading and method overriding?
Method overloading is having multiple methods with the same name but different parameters. Method overriding is having a method in a subclass with the same name and parameters as a method in its superclass.
Method overloading is a compile-time polymorphism while method overriding is a runtime polymorphism.
Method overloading is used to provide different ways of calling the same method with different parameters.
Method overriding is used to provide a specific implementation of a ...read more
Q10. what is thread and its lifecycle?
A thread is a lightweight process that can run concurrently with other threads in a program.
Threads share the same memory space as the parent process.
Threads can communicate with each other through shared memory.
Thread lifecycle includes creation, running, waiting, and termination.
Threads can be created using the Thread class in Java or pthread_create() function in C.
Examples of multithreaded programs include web servers and video games.
Q11. Given two linked list of numbers. Add them to form a new linked list example 1->2->3+4->5->6=5->7->9
Add two linked lists of numbers to form a new linked list.
Traverse both linked lists simultaneously and add the corresponding nodes.
If one list is shorter than the other, pad it with zeros.
If the sum of two nodes is greater than 9, carry over the 1 to the next node.
Create a new linked list with the sum of nodes.
Return the head of the new linked list.
Q12. What is the python code to shutdown a laptop?
The python code to shutdown a laptop is 'os.system('shutdown /s /t 1')'
Import the os module
Use the os.system() function
Pass the command 'shutdown /s /t 1' as an argument
The '/s' flag is used to shutdown the computer
The '/t 1' flag is used to set a timer of 1 second before shutdown
Q13. Print the adress of a pointer, adress of a variable and value in variable?
Printing the address of a pointer, address of a variable and value in variable.
To print the address of a pointer, use the '&' operator before the pointer variable name.
To print the address of a variable, use the '&' operator before the variable name.
To print the value in a variable, simply use the variable name.
Q14. What is sdlc? What is white box testing how it usefull
SDLC stands for Software Development Life Cycle. White box testing is a testing technique that involves testing the internal structure of the software.
SDLC is a process followed by software development teams to design, develop, test, and deploy software.
It consists of several phases such as planning, analysis, design, implementation, testing, and maintenance.
White box testing is a testing technique that involves testing the internal structure of the software, including code, ...read more
Q15. What is an exception in java?
An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions.
Exceptions are objects that are thrown when an error occurs in a program.
They can be caught and handled using try-catch blocks.
Common exceptions include NullPointerException, ArrayIndexOutOfBoundsException, and IOException.
Exceptions can be caused by a variety of factors, such as invalid input, network errors, or programming errors.
Q16. What is throw keyword in java?
throw keyword is used to explicitly throw an exception in Java.
It is followed by an instance of the Exception class or one of its subclasses.
It is used to handle exceptional situations in a program.
It is used in combination with try-catch block to handle exceptions.
Example: throw new NullPointerException();
Q17. About inheritance and explain it with real life examples?
Inheritance is a concept in object-oriented programming where a class can inherit properties and methods from another class.
Inheritance allows for code reuse and promotes a hierarchical structure.
A child class can inherit properties and methods from a parent class.
For example, a Car class can inherit properties and methods from a Vehicle class.
Another example is a Dog class inheriting properties and methods from an Animal class.
Inheritance can also involve multiple levels, wi...read more
Q18. Working of constructors in inheritance with real life examples?
Constructors in inheritance allow child classes to inherit properties and methods from parent classes.
Constructors in child classes can call the constructor of the parent class using the 'super' keyword.
If a child class does not have a constructor, it will automatically inherit the constructor of the parent class.
Constructors can be used to initialize properties of the child class as well as the parent class.
Real life example: A car is a child class of a vehicle. The construc...read more
Q19. Paper presentation experience outside your college campus.
I have presented a paper on Artificial Intelligence at a national conference.
Presented a paper on AI at a national conference organized by IEEE.
Discussed the impact of AI on the future of work and society.
Received positive feedback from the audience and panelists.
Networked with professionals in the field and gained insights into current research.
Published the paper in the conference proceedings.
Q20. What is thePrototype of C language?
The prototype of C language is int main()
The prototype specifies the return type and parameters of a function
int main() is the prototype for the main function in C
The parentheses are required even if there are no parameters
Other functions can have different prototypes depending on their return type and parameters
Q21. What is java? What are the features of java
Java is a high-level, object-oriented programming language used for developing applications and software.
Java is platform-independent, meaning it can run on any platform with a Java Virtual Machine (JVM)
It is statically-typed, which means that variables must be declared before they can be used
Java is object-oriented, which means that everything in Java is an object
It has automatic memory management, meaning that the programmer does not need to manually allocate and deallocate...read more
Q22. what are collections in java?
Collections in Java are classes and interfaces that group multiple objects into a single unit.
Collections provide a way to manage and manipulate groups of objects.
They are used to store, retrieve, and manipulate data in a structured way.
Examples of collections include ArrayList, LinkedList, HashSet, and TreeMap.
Collections can be used to sort, search, filter, and modify data.
They are an important part of Java programming and are used extensively in real-world applications.
Q23. Define oops and explain the types of it.
OOPs stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.
There are four main types of OOPs: Abstraction, Encapsulation, Inheritance, and Polymorphism.
Abstraction is the process of hiding complex implementation details and showing only the necessary information to the user.
Encapsulation is the process of binding data and functions that manipulate that data together in a single unit.
Inheritance is the process of creating new clas...read more
Q24. what are pointers?
Pointers are variables that store memory addresses of other variables in a program.
Pointers allow for dynamic memory allocation and manipulation.
They are used to pass data between functions efficiently.
Pointers can be used to create complex data structures like linked lists and trees.
Example: int *ptr; // declares a pointer to an integer variable
Example: ptr = # // assigns the address of num to ptr
Example: *ptr = 10; // assigns the value 10 to the variable pointed to by ptr
Q25. Types of data types with few examples.
Data types are classifications of data items that indicate the kind of values they contain.
Primitive data types: int, float, double, char, boolean
Non-primitive data types: arrays, strings, classes, interfaces
Examples: int age = 25, float price = 10.5, char grade = 'A', boolean isTrue = true, String name = 'John', int[] numbers = {1, 2, 3}
Q26. What is the operating system in your laptop?
The operating system in my laptop is Windows 10.
My laptop runs on Windows 10 operating system.
Windows 10 is a popular operating system developed by Microsoft.
It has a user-friendly interface and supports a wide range of software applications.
Some of the key features of Windows 10 include Cortana, Microsoft Edge, and virtual desktops.
Q27. Write code for cube of number , prime number , sorting , DBMS related , SQL.
Code for cube of number, prime number, sorting, DBMS related, SQL
Cube of a number: num*num*num
Prime number: check if num is divisible by any number from 2 to num-1
Sorting: use built-in sorting functions or implement bubble sort, merge sort, quick sort, etc.
DBMS related: learn about database design, normalization, SQL queries, etc.
SQL: use SQL commands to create, modify, and query databases
Q28. What is encapsulation. Explain it with example
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 data hiding, which prevents direct access to an object's attributes.
Encapsulation also helps in achieving data abstraction, where only necessary details are exposed to the outside world.
Example: In a class representing a car, the variables like speed and ...read more
Q29. What do you mean by abstraction
Abstraction is the process of hiding complex details and showing only essential features of an object or system.
Abstraction helps in managing complexity by breaking down a system into smaller, more manageable parts.
It allows us to focus on the important aspects of a system while ignoring the irrelevant details.
Abstraction is used in programming to create classes and objects that represent real-world entities.
For example, a car object can have properties like make, model, and ...read more
Q30. Who is CEO of TCS?
Rajesh Gopinathan is the CEO of TCS.
Rajesh Gopinathan took over as CEO of TCS in 2017.
He has been with TCS since 2001 and has held various leadership roles.
Under his leadership, TCS has continued to grow and expand globally.
Q31. What do you mean by OOPS
OOPS stands for Object-Oriented Programming System
OOPS is a programming paradigm that focuses on objects and their interactions
It allows for encapsulation, inheritance, and polymorphism
Encapsulation refers to the bundling of data and methods within a single unit
Inheritance allows for the creation of new classes based on existing ones
Polymorphism allows for the use of a single interface to represent multiple types of objects
Q32. What do you know about DBMS?
DBMS stands for Database Management System. It is a software system that allows users to define, create, maintain and control access to databases.
DBMS is used to manage large amounts of data efficiently.
It provides a way to store, retrieve and manipulate data in a structured manner.
It ensures data integrity and security.
Examples of DBMS include MySQL, Oracle, SQL Server, and PostgreSQL.
Q33. What are preprocessor in C language
Preprocessors are directives that are executed before the compilation of the program.
Preprocessors start with a # symbol.
They are used to include header files, define constants, and perform conditional compilation.
Examples of preprocessor directives are #include, #define, #ifdef, #ifndef, #endif.
Preprocessors are executed before the actual compilation of the program.
They are used to modify the source code before it is compiled.
Q34. What is a map ?
A map is a visual representation of an area, showing physical features, roads, and other details.
A map can be used for navigation and orientation.
It can show geographical features such as mountains, rivers, and lakes.
Maps can also display man-made features such as roads, buildings, and landmarks.
Different types of maps include topographic, political, and weather maps.
Maps can be created using various tools such as GPS, satellite imagery, and cartography software.
Q35. Difference between C,C++ Describe your Projects Oops concepts
Difference between C and C++, Projects, and OOPs concepts
C is a procedural language while C++ is an object-oriented language
C++ supports features like inheritance, polymorphism, and encapsulation
Projects: developed a calculator using C++, a file management system using C
OOPs concepts: Abstraction, Encapsulation, Inheritance, Polymorphism
Q36. What is a tree ?
A tree is a perennial plant with a single stem or trunk, supporting branches and leaves.
Trees are typically tall and have a woody stem.
They have roots that anchor them to the ground and absorb water and nutrients.
Trees provide oxygen, shade, and habitat for animals.
Examples of trees include oak, maple, pine, and palm trees.
Q37. models in s/w development lifecycle?
Models are used in software development lifecycle to plan, design, implement and test software.
Models help in visualizing the software development process
They provide a framework for organizing and managing the development process
Some popular models include Waterfall, Agile, Spiral, and V-Model
Each model has its own advantages and disadvantages
Choosing the right model depends on the project requirements and constraints
Q38. Create a simple form with HTML
Create a simple form with HTML
Use the <form> tag to create the form
Add <input> tags for different form fields like text, email, password, etc.
Include a submit button using <input type='submit'>
Q39. Why python and it's importance
Python is a popular high-level programming language known for its simplicity, readability, and versatility.
Python is easy to learn and use, making it a great language for beginners.
It has a large and active community, with many libraries and frameworks available for various applications.
Python is used in a wide range of industries, including web development, data science, artificial intelligence, and automation.
It is platform-independent, meaning it can run on multiple operat...read more
Q40. Type conversion in python.
Type conversion refers to the process of converting one data type to another in Python.
Python has built-in functions like int(), float(), str(), bool() for type conversion.
Type conversion can be implicit or explicit.
Implicit type conversion is done automatically by Python, while explicit type conversion is done using the built-in functions.
Examples of type conversion include converting a string to an integer using int(), or converting a float to a string using str().
Q41. Difference between truncate and delete command
Truncate is a DDL command that removes all records from a table, while delete is a DML command that removes specific records.
Truncate is faster than delete as it does not log individual row deletions.
Truncate resets the identity seed of the table, while delete does not.
Truncate cannot be rolled back, while delete can be rolled back using a transaction.
Truncate does not fire triggers, while delete does.
Example: TRUNCATE TABLE TableName; DELETE FROM TableName WHERE Condition;
Q42. software development lifecycle?
Software development lifecycle is a process of designing, developing, testing, and deploying software.
It includes phases like planning, analysis, design, implementation, testing, and maintenance.
Each phase has its own set of activities and deliverables.
The goal is to ensure that the software meets the requirements and is of high quality.
Popular models include Waterfall, Agile, and DevOps.
Tools like version control, bug tracking, and continuous integration are used to support ...read more
Q43. what is inheritance?
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows for code reuse and promotes the concept of hierarchical relationships between classes.
The existing class is called the superclass or parent class, while the new class is called the subclass or child class.
The subclass inherits all the properties and methods of the superclass, and can also add its own unique properties and meth...read more
Q44. Disadvantages of Python over Java.
Python has slower execution speed and weaker type checking compared to Java.
Python is an interpreted language, while Java is a compiled language.
Python has a slower execution speed than Java due to its interpreted nature.
Java has stronger type checking than Python, which can lead to fewer errors.
Python's dynamic typing can lead to errors that are only caught at runtime.
Java has better support for multithreading and concurrency than Python.
Python's standard library is not as c...read more
Q45. what is object oriented language
Object-oriented language is a programming language that uses objects to represent data and methods to manipulate that data.
Object-oriented programming focuses on objects that contain data and methods to manipulate that data.
It allows for encapsulation, inheritance, and polymorphism.
Examples of object-oriented languages include Java, C++, and Python.
Q46. types of inheritance?
Types of inheritance include single, multiple, multilevel, hierarchical, and hybrid inheritance.
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 inheriting from a derived class, which in turn inherits from another class.
Hierarchical inheritance involves multiple classes inheriting from a single base class.
Hybrid inheritance is a combinatio...read more
Q47. What is class and object?
A class is a blueprint for creating objects, while an object is an instance of a class.
A class defines the properties and behaviors of objects.
An object is a specific instance of a class.
Classes can have attributes (variables) and methods (functions).
Objects can interact with each other by calling methods on each other.
Example: Class 'Car' can have attributes like 'color' and 'model', while an object 'myCar' can be an instance of the 'Car' class with specific values for color...read more
Q48. Difference between clustering and grouping
Clustering is grouping similar data points together based on their characteristics, while grouping is organizing data into categories based on predefined criteria.
Clustering is unsupervised learning, while grouping is typically done based on predefined rules or criteria.
Clustering aims to find natural groupings in data, while grouping is more about organizing data for easier analysis.
Example: Clustering can be used in customer segmentation to group customers with similar purc...read more
Q49. What is lambda
Lambda is a function that can be passed as an argument or stored as a variable.
Lambda is an anonymous function in Python.
It is used for creating small, one-time use functions.
Lambda functions can take any number of arguments, but can only have one expression.
Example: lambda x: x*2 will double the input value of x.
Q50. Write a c program for sum of 5 number
A C program to find the sum of 5 numbers.
Declare an array of 5 integers
Use a loop to take input from user and store in array
Use another loop to add all the elements of array
Print the sum
Q51. Some built-in functions in C?
Some built-in functions in C are printf(), scanf(), strlen(), strcpy(), etc.
printf() - used to print output on the console
scanf() - used to take input from the user
strlen() - used to find the length of a string
strcpy() - used to copy one string to another
rand() - used to generate random numbers
Q52. Draw a binary tree ?
A binary tree is a tree data structure in which each node has at most two children, referred to as the left and right child.
A binary tree consists of nodes, each with a maximum of two children.
The topmost node is called the root node.
Nodes without any children are called leaf nodes.
The left child of a node is always less than the parent node, while the right child is always greater.
Binary trees are commonly used in computer science for searching and sorting algorithms.
Q53. Explain Virtualization in memory
Virtualization in memory allows multiple virtual machines to share physical memory resources.
Virtualization in memory creates a layer of abstraction between the physical memory and the virtual machines.
It allows for efficient use of memory resources by sharing them among multiple virtual machines.
Virtualization in memory can be implemented through techniques such as memory ballooning and memory overcommitment.
Examples of virtualization in memory technologies include VMware ES...read more
Q54. Tuple and list differences
Tuple is immutable and ordered while list is mutable and ordered.
Tuple uses () while list uses []
Tuple is faster than list for accessing elements
Tuple can be used as keys in dictionaries while list cannot
Tuple is used for heterogeneous data while list is used for homogeneous data
Q55. Left view of a binary tree
A left view of a binary tree shows the leftmost node at each level.
The left view can be obtained through a depth-first search algorithm.
The leftmost node at each level can be stored in an array.
The time complexity of obtaining the left view is O(n).
Q56. Application of map ?
Maps are used to represent geographical locations and provide directions.
Maps can be used for navigation and finding directions.
They can also be used to display geographical data and information.
Maps can be interactive and allow users to zoom in and out, and view different layers of information.
They can be used in various industries such as transportation, tourism, and real estate.
Examples of popular map applications include Google Maps, Apple Maps, and Waze.
Q57. Memory storage in python
Python uses dynamic memory allocation to store data in memory.
Python automatically manages memory allocation and deallocation.
Memory is allocated as needed and released when no longer in use.
Python has built-in data structures like lists, tuples, and dictionaries that use memory.
Python also has modules like NumPy and Pandas for efficient memory management.
Garbage collection is used to free up memory that is no longer needed.
Q58. Explain public static void main.
The public static void main is the entry point of a Java program.
public: Access modifier indicating that the method is accessible from outside the class.
static: Indicates that the method belongs to the class itself, not an instance of the class.
void: Indicates that the method does not return any value.
main: The name of the method that serves as the entry point for the program.
String[] args: An array of strings that can be passed as arguments when the program is executed.
Q59. Difference between C++ and Java
C++ is a statically typed language with a focus on performance and low-level memory manipulation, while Java is a platform-independent language with automatic memory management.
C++ is a statically typed language, while Java is a dynamically typed language
C++ allows for manual memory management, while Java has automatic memory management through garbage collection
C++ supports multiple inheritance, while Java supports only single inheritance through interfaces
C++ has pointers, ...read more
Q60. Explain Round Robin Algorithm
Round Robin is a CPU scheduling algorithm that assigns a fixed time slice to each process in a circular queue.
Each process is given a time slice or quantum to execute.
After the time slice is over, the process is preempted and added to the end of the queue.
The next process in the queue is then given a time slice to execute.
This continues until all processes have executed.
The time slice is usually small, typically between 10-100 milliseconds.
Round Robin is a preemptive algorith...read more
Q61. What is a transistor
A transistor is a semiconductor device that amplifies or switches electronic signals and electrical power.
Transistors are fundamental building blocks of modern electronic devices.
They are used in various applications such as amplifiers, switches, and oscillators.
Transistors can be categorized into different types such as bipolar junction transistors (BJTs) and field-effect transistors (FETs).
They have three terminals: emitter, base, and collector (for BJTs) or source, gate, a...read more
Q62. Shift comfortable with
I am comfortable with any shift timings as per the company's requirement.
I am flexible with my schedule and can adjust accordingly
I understand that shift timings may vary depending on the project or team requirements
I am willing to work overtime or on weekends if needed
I have experience working in different shifts during my previous job
Q63. Advantages of Python
Python is a versatile, high-level programming language with a simple syntax and powerful libraries.
Easy to learn and use
Large standard library with many modules for various tasks
Cross-platform compatibility
Supports multiple programming paradigms
Used in various fields such as web development, data science, machine learning, and more
Q64. Four pillars of OOPS
The four pillars of OOPS are Abstraction, Encapsulation, Inheritance, and Polymorphism.
Abstraction: Hiding implementation details and showing only necessary information.
Encapsulation: Wrapping data and methods into 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.
Q65. Merge Sort Algorithm
Merge Sort is a divide and conquer algorithm that sorts an array by dividing it into two halves, sorting them separately, and then merging the sorted halves.
Divide the array into two halves
Sort each half recursively
Merge the two sorted halves
Time complexity is O(n log n)
Space complexity is O(n)
More about working at TCS
Top HR Questions asked in Aequs
Interview Process at Aequs
Top Assistant System Engineer Trainee Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month