TCS
100+ Amit Jindal Infraways Indore Interview Questions and Answers
Elections are going on, and there are two candidates A and B, contesting with each other. There is a queue of voters and in this queue, some of them are supporters of A and some of them a...read more
You are given a string S containing only uppercase English characters. Find whether S is the same as its reflection in the mirror.
For Example, S = “AMAMA” is the same as its reflection in the mirr...read more
You have given a Singly Linked List of integers, determine if it forms a cycle or not.
A cycle occurs when a node's next points back to a previous node in the list. The li...read more
Bob always bragged about his smartness. To test this, Alice gave him an
array ‘A’ of size ‘N’ and asked him to find the number of twin pairs in that array.
A twin pair can be defined as a pair of inde...read more
You have been given an input integer 'N'. Your task is to print the following binary pattern for it.
Example
Pattern for 'N' = 4 1111 000 11 0
The first line contains 'N' 1s. The next line contai...read more
Ninja is playing with numbers but hates when he gets duplicate numbers. Ninja is provided an array, and he wants to remove all duplicate elements and return the array, but he has to maintain th...read more
You have been given an integer array/list(arr) and a number 'Sum'. Find and return the total number of pairs in the array/list which when added, results equal to the 'Sum'.
Note:
G...read more
A thief wants to loot houses. He knows the amount of money in each house. He cannot loot two consecutive houses. Find the maximum amount of money he can loot.
Input Format :
The first line of input c...read more
A thief is robbing a store and can carry a maximal weight of W into his knapsack. There are N items and the ith item weighs wi and is of value vi. Considering the constraints of the maximum weight t...read more
Ninja is in space with his super spaceship having unlimited fuel. Ninja initially has a health level ‘H’ and his spaceship has an armour ‘A’. He decides to play a game, where at any instant he can ...read more
There is a person named Bob who is the mayor of a state. He wants to find the maximise number of vehicles that can be registered in his state.
A vehicle normally has a registration number like...read more
You are given an array, ‘COORDINATES’ that represents the integer coordinates of some points on a 2D plane. Your task is to find the minimum cost to make all the points connect...read more
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.
Note:
Each pair shou...read more
Ninja is a poor but an intelligent boy. He has a rod of length ‘N’ units. He wants to earn maximum money by selling this rod in the market. So he cuts the rod into different sizes and each size ha...read more
Q15. What is the difference b/w Procedural Programming and OOP Concept? What are the problems with C in this context?
Procedural programming focuses on procedures and functions, while OOP emphasizes objects and classes.
Procedural programming uses a top-down approach, while OOP uses a bottom-up approach.
In procedural programming, data and functions are separate, while in OOP, they are encapsulated within objects.
Procedural programming is more suitable for small-scale programs, while OOP is better for large-scale projects.
C is a procedural programming language, lacking the features of OOP like...read more
Q16. Explain Difference b/w Constructor and Method also write the code which can describe the difference b/w the two?
A constructor is a special method used to initialize an object, while a method is a function that performs a specific task.
Constructors are called automatically when an object is created, while methods need to be called explicitly.
Constructors have the same name as the class, while methods can have any valid name.
Constructors do not have a return type, while methods can have a return type.
Constructors are used to set initial values of instance variables, while methods are use...read more
What is meant by an entity-relationship (E-R) model? Explain the terms Entity, Entity Type, and Entity Set in DBMS.
Q18. Model an upsetting(metal forming) operation. Explain the process parameters and how would you relate them
Modeling an upsetting operation involves understanding process parameters and their relationships.
Upsetting is a metal forming process that involves compressing a metal workpiece to reduce its length and increase its diameter.
Process parameters include temperature, pressure, and deformation rate.
Temperature affects the material's flow stress and ductility, while pressure and deformation rate affect the material's strain hardening behavior.
The relationship between these parame...read more
Q19. What do you know about Protocols? Explain Different types of Protocols?
Protocols are a set of rules that govern the communication between devices or systems.
Protocols define the format, timing, sequencing, and error checking of messages exchanged between devices.
Different types of protocols include network protocols (TCP/IP, HTTP, FTP), communication protocols (RS-232, USB, Bluetooth), and application protocols (SMTP, POP3, IMAP).
Network protocols govern the communication between devices on a network, while communication protocols govern the com...read more
What are the various types of inheritance?
What are the various types of constructors in C++?
simple question based on how many different permutation of a string is allowed when there are cases involved like 1st character is fixed or 1&2 or 12&3 characters are fixed like this
Q23. What is the difference b/w assignment and initialization?
Assignment is assigning a value to a variable, while initialization is declaring and assigning a value to a variable.
Assignment changes the value of an existing variable, while initialization creates a new variable and assigns a value to it.
Initialization is done only once, while assignment can be done multiple times.
Example of initialization: int x = 5; Example of assignment: x = 10;
Initialization can also be done using constructors in object-oriented programming.
In C++, uni...read more
How does C++ support Polymorphism?
Q25. Write a code to describe the difference b/w normal function calling and stored procedure invocation?
A normal function is called directly in the code, while a stored procedure is invoked using a database query.
Normal function calling is done within the program code, while stored procedure invocation is done through a database query.
Normal functions are defined and called within the same programming language, while stored procedures are defined and invoked within a database management system.
Normal function calling is synchronous, while stored procedure invocation can be asyn...read more
Q26. What do you mean by experience certainty?
Experience certainty refers to the level of confidence and assurance gained through repeated exposure to a particular task or situation.
Experience certainty is achieved through repetition and familiarity.
It allows individuals to perform tasks with greater ease and efficiency.
For example, a pilot who has flown the same route multiple times will have a higher level of experience certainty compared to a pilot who is flying the route for the first time.
Experience certainty can al...read more
What tech stack I used and why?
What problem does your project solve?
Q28. What is the smallest and the biggest real time project of Java according to you? What is Big Data? If you have to perform actions on 2 billion entry at a time. What would you do and which languages and technolo...
read moreThe smallest real-time project in Java could be a simple chat application, while the biggest could be a complex financial trading system.
Smallest real-time project in Java: Chat application
Biggest real-time project in Java: Financial trading system
Big Data refers to large and complex data sets that cannot be easily processed using traditional data processing applications.
For performing actions on 2 billion entries, technologies like Hadoop, Spark, and languages like Java or S...read more
Q29. What are the advantages of Stored Procedures?
Stored procedures offer advantages such as improved performance, security, and code reusability.
Stored procedures can reduce network traffic by executing multiple SQL statements at once.
They can also improve performance by pre-compiling SQL statements.
Stored procedures can enhance security by allowing access to only specific procedures rather than entire tables.
They promote code reusability by allowing multiple applications to use the same stored procedure.
Examples include pr...read more
Q30. Why did you learn PHP, if JSP is more secure?
PHP was chosen for its versatility, large community support, and ease of use.
PHP is a widely used scripting language with a large community of developers and extensive documentation.
It is known for its versatility and ability to integrate with various databases and web servers.
PHP is also relatively easy to learn and has a low learning curve compared to other languages like JSP.
While JSP may be considered more secure, PHP can still be used to build secure applications with pr...read more
Q31. What do you know about File System in C++?
File System in C++ is used for managing files and directories, providing functions for file input/output operations.
C++ provides the
library for file input/output operations. File streams can be used to read from and write to files.
Common file operations include opening, closing, reading, and writing files.
File streams can handle different file types such as text files and binary files.
File system functions like file existence check, file deletion, and file renaming are avail...read more
Q32. What is the difference b/w thread and process?
A thread is a lightweight unit of execution within a process, while a process is an instance of a program in execution.
A process has its own memory space, while threads share the same memory space within a process.
Processes are independent and isolated from each other, while threads share resources and can communicate with each other more easily.
Creating a new process is more resource-intensive than creating a new thread.
Threads are scheduled by the operating system, while pr...read more
Q33. What is operating system? Difference between compiler and interpretor? One byte is how many bit? What is Machine language? What is the function of assembler ? What are the different types of operating system? W...
read moreOperating system is a software that manages computer hardware and software resources.
Compiler translates high-level language code to machine code while interpreter executes code line by line.
One byte is equal to 8 bits.
Machine language is a low-level programming language consisting of binary code.
Assembler converts assembly language code to machine code.
Types of operating system include Windows, macOS, Linux, and Unix.
Unix is a multi-user, multi-tasking operating system devel...read more
Q34. How many annotations in TestNG and brief all the annotations.
TestNG has 8 annotations including @Test, @BeforeSuite, @AfterSuite, @BeforeTest, @AfterTest, @BeforeClass, @AfterClass, @BeforeMethod, @AfterMethod.
1. @Test - Marks a method as a test method.
2. @BeforeSuite - Executed before the Test Suite.
3. @AfterSuite - Executed after the Test Suite.
4. @BeforeTest - Executed before the Test.
5. @AfterTest - Executed after the Test.
6. @BeforeClass - Executed before the first test method in the current class.
7. @AfterClass - Executed after a...read more
Explain the difference between the DELETE and TRUNCATE command in a DBMS
There were questions on time/distance, number system, work and time.
There were questions on Reading Comprehension.
Q37. Do you Know JSP? What is JSP? Its Advantages?
JSP is a Java-based technology used for creating dynamic web pages. It allows embedding Java code within HTML pages.
JSP stands for JavaServer Pages.
It is a technology used for developing web applications.
JSP allows embedding Java code within HTML pages.
It provides a simplified way to create dynamic web content.
JSP files are compiled into servlets and executed on the server.
Advantages of JSP include easy integration with Java code, reusable components, and separation of presen...read more
Q38. Do you know about TCS bond agreement?
TCS bond agreement is a contract signed by employees to work for a certain period of time with the company.
TCS bond agreement is a legal contract between TCS and its employees.
Employees sign the bond agreement to work for a certain period of time with the company.
The bond period can range from 1 to 2 years depending on the role and level of the employee.
If an employee wishes to leave the company before the bond period ends, they are required to pay a certain amount as compens...read more
Q39. Do you know what stored procedures are?
Stored procedures are pre-written SQL codes that can be saved and reused.
Stored procedures can improve database performance by reducing network traffic.
They can be used to enforce business rules and security measures.
They can be parameterized to accept input values and return output values.
Examples include procedures for inserting, updating, and deleting data.
They can also be used for complex operations such as data aggregation and reporting.
Q40. Explain Difference b/w Function and Stored Procedure?
Functions return a value while stored procedures do not.
Functions are used to perform a specific task and return a value to the caller.
Stored procedures are used to execute a set of statements and do not return a value.
Functions can be used in SELECT, WHERE, and HAVING clauses.
Stored procedures can be used to modify data, but functions cannot.
Functions can be called from within a stored procedure.
Q41. What is Page Object Model and page factory
Page Object Model is a design pattern in test automation that represents web pages as objects, while Page Factory is a way to initialize elements in Page Object Model.
Page Object Model is a design pattern used in test automation to represent web pages as objects
It helps in creating reusable code and reduces code duplication
Page Factory is a concept in Selenium WebDriver that helps in initializing elements in Page Object Model
It uses @FindBy annotation to locate elements on a ...read more
Q42. What do you understand by Deadlocks?
Deadlocks occur when two or more processes are unable to proceed because each is waiting for the other to finish.
Deadlocks happen when two or more processes are blocked and unable to proceed
Each process is waiting for a resource that is being held by another process
Deadlocks can be prevented by using techniques like resource allocation graphs and banker's algorithm
Examples of deadlocks include the dining philosophers problem and the traffic deadlock problem
Q43. What are types of File System in OS?
Types of file systems in OS include FAT, NTFS, HFS+, ext2/3/4, and APFS.
FAT (File Allocation Table) is a simple file system used by older versions of Windows.
NTFS (New Technology File System) is a more advanced file system used by newer versions of Windows.
HFS+ (Hierarchical File System Plus) is used by Apple's macOS.
ext2/3/4 are file systems used by Linux.
APFS (Apple File System) is a newer file system used by Apple's macOS and iOS devices.
Q44. What is python? Why we use it. Is it case sensitive?
Python is a high-level, interpreted programming language used for web development, data analysis, and artificial intelligence.
Python is easy to learn and has a simple syntax.
It has a large standard library with many pre-built modules.
Python is used for web development with frameworks like Django and Flask.
It is also used for data analysis with libraries like NumPy and Pandas.
Python is case sensitive.
It is a popular language for artificial intelligence and machine learning.
Pyt...read more
Q45. Can you learn coding, if it is needed?
Yes, I am willing to learn coding if it is needed.
I have some basic knowledge of coding and am willing to improve my skills.
I am a quick learner and can adapt to new technologies easily.
I am open to taking courses or attending training sessions to improve my coding skills.
Learning coding will also help me better understand the systems I work with.
For example, I have experience with Python and SQL, and can learn other languages as needed.
Q46. What are the properties of Constructor?
Constructor is a special method used to initialize objects in a class.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
They can take parameters to initialize the object's properties.
They do not have a return type.
Multiple constructors can be defined with different parameters.
Example: public class Car { public Car(String make, String model) { ... } }
Q47. Write a code to allocate the memory to object?
Code to allocate memory to an object
Use the 'new' keyword in C++ to allocate memory to an object
Use 'malloc' function in C to allocate memory to an object
In Java, memory is automatically allocated to an object using 'new' keyword
In Python, memory is automatically allocated to an object when it is created
Q48. what is oop? what is difference between python and c programming? write a program on reverse a string?
OOP stands for Object-Oriented Programming. Python and C differ in syntax, memory management, and application areas. A program to reverse a string can be written using loops or slicing.
OOP is a programming paradigm that focuses on objects and their interactions.
Python is a high-level language with dynamic typing and automatic memory management, while C is a low-level language with static typing and manual memory management.
To reverse a string using loops, iterate through the ...read more
Q49. functions of basic electronic componenents like R L C
R, L, and C are basic electronic components used in circuits for resistance, inductance, and capacitance respectively.
Resistors (R) limit current flow and reduce voltage
Inductors (L) store energy in a magnetic field and resist changes in current
Capacitors (C) store energy in an electric field and pass AC signals while blocking DC signals
These components are used in various circuits such as filters, oscillators, and amplifiers
Q50. What do you mean by Paging?
Paging is a memory management technique used by operating systems to manage memory usage.
Paging divides memory into fixed-size pages.
Pages are stored in physical memory or on disk.
When a process needs a page, it is loaded into physical memory.
If there is no space in physical memory, a page is swapped out to disk.
Paging allows for efficient use of memory and prevents processes from accessing memory they shouldn't.
Examples of operating systems that use paging include Windows, L...read more
Q51. How to write Webdriver with in your code
Webdriver can be written in code using Selenium WebDriver library for automating web applications.
Import the necessary Selenium WebDriver library in your code
Create a WebDriver instance for the desired browser (e.g. Chrome, Firefox)
Use WebDriver methods to interact with elements on the web page (e.g. findElement, click, sendKeys)
Write test cases using WebDriver commands to automate testing scenarios
Q52. what is the potential diffrence acc to u
Potential difference is the difference in electric potential between two points in an electric field.
Potential difference is measured in volts (V)
It is the work done per unit charge to move a charge from one point to another
It is the driving force that causes current to flow in a circuit
Potential difference can be calculated using Ohm's law: V = IR
A battery creates a potential difference between its terminals to power a circuit
Q53. what is the function of a switch
A switch is a networking device that connects devices together on a local area network (LAN) and forwards data packets between them.
Switches operate at the data link layer of the OSI model.
They use MAC addresses to forward data to the correct destination.
Switches can improve network performance by reducing network congestion and collisions.
Examples of switches include Ethernet switches, LAN switches, and network switches.
Q54. primary key can be a null or not?
No, primary key cannot be null.
Primary key uniquely identifies a record in a table.
Null values are not unique and can cause data integrity issues.
Primary key constraint ensures that the value is not null.
However, primary key can have a default value.
Q55. What is oops ? What is ORM in python? Multiple Inheritance in java vs python?
OOPs is a programming paradigm that uses objects to represent real-world entities. ORM is a technique to map objects to relational databases.
OOPs stands for Object-Oriented Programming.
It is based on the concept of objects, which can contain data and code.
In OOPs, objects interact with each other to perform tasks.
ORM stands for Object-Relational Mapping.
It is a technique to map objects to relational databases.
ORM allows developers to work with objects instead of SQL statement...read more
Q56. Can you explain encapsulation?
Encapsulation is the process of hiding internal details and providing a public interface for accessing and manipulating data.
Encapsulation is a fundamental concept in object-oriented programming.
It allows for data abstraction and information hiding.
Encapsulation helps in achieving data integrity and security.
It promotes code reusability and modularity.
Example: A class in Java with private variables and public methods.
Q57. What is normalization?
Normalization is the process of organizing data in a database to eliminate redundancy and improve data integrity.
Normalization helps in reducing data redundancy by breaking down a large table into smaller, more manageable tables.
It ensures that each piece of data is stored in only one place, reducing the chances of inconsistencies.
Normalization follows a set of rules called normal forms, such as First Normal Form (1NF), Second Normal Form (2NF), etc.
Normalization improves dat...read more
Q58. what is LAN MAN WAN PAN ETC
LAN, MAN, WAN, PAN are types of computer networks that differ in their geographical coverage and purpose.
LAN (Local Area Network) is a network that covers a small area like a home, office, or building.
MAN (Metropolitan Area Network) is a network that covers a larger area like a city or town.
WAN (Wide Area Network) is a network that covers a large geographical area like a country or the whole world.
PAN (Personal Area Network) is a network that connects devices within a person'...read more
Q59. Do you Know Phantom Deadlocks?
Yes, phantom deadlocks are a type of deadlock that occur due to incorrect lock ordering.
Phantom deadlocks occur when multiple processes or threads attempt to acquire locks in a different order.
This can lead to a situation where each process is waiting for a lock held by another process, resulting in a deadlock.
Phantom deadlocks can be difficult to detect and reproduce as they are intermittent and depend on the timing of lock acquisitions.
To prevent phantom deadlocks, it is im...read more
Q60. What are cookies in PHP?
Cookies in PHP are small text files that are stored on the user's computer to track and store information about the user's activities on a website.
Cookies are used to remember user preferences and login information.
They can be set, retrieved, and deleted using PHP's setcookie(), $_COOKIE, and setcookie() functions respectively.
Cookies can have an expiration date and can be set to be accessible only over a secure connection.
They are commonly used for tracking user behavior, pe...read more
Q61. How to reverse string, array. What is args in Java.
To reverse a string or array in Java, use StringBuilder or Collections.reverse. 'args' in Java is an array of strings passed as command line arguments.
Use StringBuilder to reverse a string: StringBuilder str = new StringBuilder('hello'); str.reverse();
Use Collections.reverse to reverse an array: List
list = Arrays.asList('apple', 'banana', 'cherry'); Collections.reverse(list); 'args' in Java is an array of strings used to pass command line arguments to a Java program.
Q62. write a program for division nd multiplication inn 8085 processor
Program for division and multiplication in 8085 processor.
For multiplication, use MUL instruction with 8-bit operand.
For division, use DIV instruction with 8-bit dividend and 16-bit divisor.
Store the result in appropriate registers or memory locations.
Example: To multiply two numbers in registers B and C, use MUL C instruction.
Example: To divide two numbers in registers A and B, use DIV B instruction.
Q63. What are Constructors?
Constructors are special methods used to initialize objects in a class.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
They can be used to set default values for object properties.
Constructors can be overloaded to accept different parameters.
Example: public class Car { public Car() { //constructor code here } }
Q64. explain the concepts of a router
A router is a networking device that forwards data packets between computer networks.
A router operates at the network layer of the OSI model.
It uses routing tables to determine the best path for data packets to reach their destination.
Routers can connect multiple networks together, such as LANs and WANs.
They provide network address translation (NAT) to allow multiple devices to share a single public IP address.
Routers can also provide firewall functionality to protect the net...read more
Q65. Differences between Object Oriented and Procedure oriented programming languages
Object-oriented programming focuses on objects and their interactions, while procedure-oriented programming focuses on procedures and functions.
OOP is based on the concept of classes and objects, while POP is based on procedures and functions.
OOP supports encapsulation, inheritance, and polymorphism, while POP does not.
OOP is more suitable for large-scale projects, while POP is more suitable for small-scale projects.
Examples of OOP languages include Java, C++, and Python, whi...read more
Q66. what are static & dynamic protocols
Static protocols are fixed and do not change, while dynamic protocols can adapt to changing network conditions.
Static protocols are typically used in simple networks with predictable traffic patterns.
Dynamic protocols are used in complex networks with varying traffic patterns.
Examples of static protocols include ARP and RARP.
Examples of dynamic protocols include OSPF and BGP.
Q67. 3. Find the sum of all numbers from a list except self
Sum all numbers in a list except self
Iterate through the list and add all numbers except the current one
Use a loop or built-in functions like sum() and list comprehension
Q68. Explain characteristics of DBMS?
DBMS is a software system that manages databases, providing features like data storage, retrieval, and manipulation.
DBMS stands for Database Management System.
It provides a structured way to store and organize data.
DBMS allows multiple users to access and manipulate the data simultaneously.
It ensures data integrity and security through various mechanisms.
DBMS provides a query language to retrieve and manipulate data, such as SQL.
Examples of popular DBMS include Oracle, MySQL,...read more
Q69. What is the difference between DBMS and NoSQL?
DBMS is a traditional relational database management system, while NoSQL is a non-relational database management system.
DBMS uses structured query language (SQL) for querying and managing data, while NoSQL databases use different query languages or APIs.
DBMS is typically used for structured data with predefined schemas, while NoSQL is more flexible and can handle unstructured or semi-structured data.
DBMS is ACID-compliant (Atomicity, Consistency, Isolation, Durability), ensur...read more
Q70. Problem arrange 3 numbers in ascending order. Just write the logic
Logic to arrange 3 numbers in ascending order.
Compare first two numbers and swap if necessary
Compare second and third numbers and swap if necessary
Repeat until no more swaps are needed
Q71. diff betn passive & active components
Passive components do not require an external power source, while active components do.
Passive components include resistors, capacitors, and inductors.
Active components include transistors, diodes, and integrated circuits.
Passive components do not amplify signals, while active components do.
Passive components are used to control the flow of electricity, while active components are used to create and amplify signals.
Q72. Why did you create project in machine learning
I created a project in machine learning to improve the accuracy of a recommendation system.
To enhance the user experience by providing personalized recommendations
To optimize the efficiency of the system by automating the recommendation process
To leverage the power of data analysis and pattern recognition in making accurate predictions
To explore the potential of machine learning algorithms in solving real-world problems
To stay updated with the latest advancements in the field...read more
Q73. What is cloud computing and explain?
Cloud computing is the delivery of computing services over the internet, allowing users to access and store data and applications remotely.
Cloud computing allows users to access data and applications from any device with an internet connection.
It eliminates the need for physical hardware and on-site data centers.
Examples of cloud computing services include Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform.
Q74. Do you know coding?
Yes, I know coding.
I am proficient in programming languages such as Java, Python, and C++.
I have experience in developing and maintaining software applications.
I am familiar with software development methodologies such as Agile and Waterfall.
Q75. How do you handle stack over flow?
Handle stack overflow by optimizing code, using dynamic memory allocation, and implementing error handling.
Optimize code to reduce memory usage and prevent stack overflow.
Use dynamic memory allocation for large data structures.
Implement error handling to gracefully handle stack overflow situations.
Q76. Difference between heap and stack memory?
Heap memory is used for dynamic memory allocation, while stack memory is used for static memory allocation.
Heap memory is allocated at runtime and can be accessed randomly, while stack memory is allocated at compile time and is accessed in a LIFO manner.
Heap memory is managed by the programmer, while stack memory is managed by the compiler.
Heap memory is typically used for storing objects and data structures, while stack memory is used for storing local variables and function...read more
Q77. what is differne betwwen if else and while loop
if-else is a conditional statement while while loop is a repetitive statement.
if-else statement is used to execute a block of code based on a condition
while loop is used to execute a block of code repeatedly as long as a condition is true
if-else statement is used for decision making while while loop is used for iteration
if-else statement can have multiple conditions while while loop has only one condition
Example: if(age > 18){ console.log('You are an adult'); } else { console...read more
Q78. Explain OOPS concepts. Explain projects you have done.
OOPS concepts include inheritance, encapsulation, polymorphism, and abstraction. Projects include developing a CRM system and a mobile app.
Inheritance: Allows a class to inherit properties and behavior from another class. Example: Parent class 'Vehicle' and child class 'Car'.
Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: Class 'Employee' with private variables and public methods.
Polymorphism: Ability to present the same interfac...read more
Q79. Circuit Diagram
A circuit diagram is a graphical representation of an electrical circuit.
It shows the components and connections in the circuit
Symbols are used to represent each component
Lines represent the wires connecting the components
It helps in understanding the circuit's function and troubleshooting
Examples include diagrams for simple circuits like a flashlight or complex circuits like a computer motherboard
Q80. What is singleton class explain with example
A singleton class is a class that can only have one instance created throughout the entire application.
Singleton classes are used when we want to restrict the number of instances of a class to one.
They are often used in scenarios where we need to maintain a single point of control or coordination.
For example, a logger class can be implemented as a singleton class to ensure that only one instance of the logger is created and used throughout the application.
Q81. what is subnetting
Subnetting is the process of dividing a network into smaller subnetworks, called subnets, to improve network efficiency and security.
Subnetting allows for better utilization of IP addresses by dividing a network into smaller segments.
It helps in improving network performance by reducing network congestion.
Subnetting enhances network security by isolating different departments or devices within a network.
It enables efficient routing and reduces broadcast traffic.
Example: A net...read more
Q82. what are protocols
Protocols are a set of rules and guidelines that govern the communication between devices or systems.
Protocols define the format and order of messages exchanged between devices.
They ensure reliable and efficient communication by specifying error detection and correction mechanisms.
Examples of protocols include TCP/IP, HTTP, SMTP, and FTP.
Protocols can operate at different layers of the network stack, such as the application layer, transport layer, or network layer.
Q83. How to connect mongoDB in python
Use pymongo library to connect mongoDB in python
Install pymongo library using pip
Import pymongo in your python script
Create a MongoClient object with the connection string
Access the database and collection using the MongoClient object
Q84. 2. What are decorators in Python
Decorators are functions that modify the behavior of other functions without changing their source code.
Decorators are denoted by the '@' symbol followed by the decorator function name
They can be used to add functionality to a function, such as logging or timing
They can also be used to modify the behavior of a function, such as adding caching or authentication
Decorators can be stacked on top of each other to apply multiple modifications to a function
Example: @staticmethod, @c...read more
Q85. write code for polymorphism?
Polymorphism is achieved through method overriding and method overloading.
Polymorphism allows objects of different classes to be treated as if they are objects of the same class.
Method overriding is when a subclass provides its own implementation of a method that is already defined in its superclass.
Method overloading is when a class has multiple methods with the same name but different parameters.
Polymorphism can be achieved through interfaces as well.
Example: Animal class w...read more
Q86. What is interfaces nad abstract ?
Interfaces and abstract are programming concepts used to achieve abstraction and modularity in code.
Interfaces define a set of methods that a class must implement.
Abstract classes are classes that cannot be instantiated and can have both abstract and non-abstract methods.
Both concepts are used to achieve abstraction and modularity in code.
Interfaces are used to define contracts between classes, while abstract classes are used to provide a base implementation for subclasses.
Ja...read more
Q87. malloc and calloc? what is union? code for factorial
malloc and calloc are memory allocation functions in C. Union is a data type that allows storing different data types in the same memory location. Factorial is a mathematical operation.
malloc() allocates a block of memory of specified size and returns a pointer to the first byte of the block.
calloc() allocates a block of memory for an array of elements, initializes them to zero, and returns a pointer to the first byte of the block.
Union is a data type that allows storing diff...read more
Q88. tell me about query optimization?
Query optimization is the process of improving the efficiency and performance of database queries.
Identifying slow queries and analyzing their execution plans
Creating appropriate indexes on tables to speed up query execution
Rewriting queries to use efficient joins and filters
Using query hints or optimizer hints to guide the query optimizer
Regularly monitoring and tuning the database for optimal performance
Q89. What are the DML commands you have used
DML commands I have used include INSERT, UPDATE, DELETE in SQL databases.
INSERT: Used to add new records to a table
UPDATE: Used to modify existing records in a table
DELETE: Used to remove records from a table
Q90. String reversal without out using any method
Reverse a string without using any built-in methods
Create a new array to store the reversed string
Iterate through the original string from end to start and add each character to the new array
Join the characters in the new array to form the reversed string
Q91. What are the OOPs 4 pillars ?
The 4 pillars of OOPs are Inheritance, Encapsulation, Abstraction, and Polymorphism.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation restricts access to certain components within a class, protecting the data.
Abstraction hides complex implementation details and only shows the necessary features.
Polymorphism allows objects to be treated as instances of their parent class or their own class.
Q92. Model a milling process
A milling process involves removing material from a workpiece using a rotating cutting tool.
Select appropriate cutting tool and workpiece material
Determine the cutting speed, feed rate, and depth of cut
Set up the milling machine and secure the workpiece
Start the machine and monitor the process for any issues
Inspect the finished product for accuracy and quality
Q93. Write a paragraph on
A system engineer is responsible for designing, implementing, and maintaining computer systems and networks.
System engineers design and implement computer systems and networks
They ensure the systems are secure and reliable
They troubleshoot and resolve technical issues
They work with other IT professionals to ensure the systems meet business needs
Examples of systems they may work on include servers, databases, and cloud computing platforms
Q94. Convert Binary to Octal
Binary to Octal conversion involves grouping binary digits into sets of three and then converting each set to its corresponding octal digit.
Group binary digits into sets of three starting from the rightmost digit
If the leftmost set has less than three digits, add zeros to the left
Convert each set of three binary digits to its corresponding octal digit
Combine all the octal digits to get the final octal number
Q95. How to install os on server
To install an OS on a server, you need to boot from the installation media and follow the on-screen instructions.
Insert the installation media (such as a USB drive or DVD) into the server
Boot the server from the installation media
Follow the on-screen instructions to select the OS version, partition the disk, and complete the installation process
Q96. Explain DBMS?
DBMS stands for Database Management System. It is a software that manages and organizes data in a structured manner.
DBMS is a software system that allows users to create, retrieve, update, and manage databases.
It provides an interface for users to interact with the database and perform various operations.
DBMS ensures data integrity, security, and consistency.
It supports multiple users accessing the database simultaneously.
Examples of popular DBMS include Oracle, MySQL, SQL Se...read more
Q97. Types of joins?
Types of joins in SQL include inner join, left join, right join, and full outer join.
Inner join returns only the matching rows from both tables.
Left join returns all rows from the left table and the matching rows from the right table.
Right join returns all rows from the right table and the matching rows from the left table.
Full outer join returns all rows from both tables, including unmatched rows.
Q98. file handle in c?
A file handle in C is a pointer that represents a file stream, allowing operations like reading and writing.
A file handle is typically obtained by opening a file using functions like fopen()
File handles are used to perform operations like reading, writing, and closing files
They can be passed as arguments to functions like fread(), fwrite(), and fclose()
File handles can be used to check for errors during file operations
Q99. what is module.exports
module.exports is a special object in Node.js that allows you to export functions, objects, or primitive values from a module.
Used to export functions, objects, or primitive values from a module
Can be assigned directly to a function, object, or value to be exported
Commonly used in Node.js to create reusable modules
Q100. what is page object model
Page Object Model is a design pattern used in test automation to create an object repository for web elements on a web page.
It helps in creating reusable and maintainable code for automated tests.
Each web page is represented as a class, and the elements on the page are defined as variables within the class.
Methods are created to perform actions on these elements, making the tests more readable and easier to maintain.
Page Object Model promotes code reusability and reduces code...read more
More about working at TCS
Top HR Questions asked in Amit Jindal Infraways Indore
Interview Process at Amit Jindal Infraways Indore
Top System Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month