Get free ebooK with 50 must do coding Question for Product Based Companies solved
Fill the details & get ebook over email
Thank You!
We have sent the Ebook on 50 Must Do Coding Questions for Product Based Companies Solved over your email. All the best!

Infosys Technical Interview Questions

Last Updated on July 3, 2023 by Mayank Dham

The technical interview is a crucial stage in the selection process for landing a position at Infosys, a renowned global leader in consulting and IT services. To help you prepare effectively, we have compiled a comprehensive guide to Infosys technical interview questions. This article aims to equip you with the knowledge and insights necessary to confidently tackle the technical aspects of the interview.

During the technical interview at Infosys, candidates are evaluated on their proficiency in programming languages, problem-solving abilities, understanding of data structures and algorithms, and their practical application of technical concepts. The interview questions are designed to assess your technical skills, logical reasoning, and ability to think critically in a technical context. In this article, we will discuss various Infosys Technical Interview Questions.

Infosys Technical Interview Questions

This section contains the common Infosys Technical Interview Questions that were previously asked. There is a greater probability that the same questions will be asked in your interview too. So, let’s start.
.

Q1. Explain Collection Framework in Java.
Ans. The Collection Framework in Java is a group of classes and interfaces that provides a unified architecture for representing and manipulating groups of objects. It includes data structures such as lists, sets, and maps, as well as algorithms for performing common operations on these structures. The framework is designed to be flexible, efficient, and easy to use, and is an essential part of the Java programming language. Some of the key classes and interfaces in the Collection Framework include ArrayList, LinkedList, HashSet, HashMap, and Iterator.

Q2. Enlist the differences between getch() and getche().
Ans. In C language, the differences between getch() and getche() are:

  • Return Value: getch() returns an integer value (ASCII value of the entered key), whereas getche() returns a character value (the entered key).
  • Buffering: getch() does not echo the entered key to the console and does not buffer the keystroke, while getche() echoes the entered key to the console and buffers the keystroke.
  • Library: getch() is a part of the conio.h library, whereas getche() is not a part of this library.
  • Compatibility: getche() is not a standard C function and is not compatible with some compilers, while getch() is a standard function and is compatible with most C compilers.
  • Usage: getch() is typically used for reading a single character input from the console without echoing it, while getche() is typically used for reading a single character input from the console and echoing it.

Q3. Explain SDLC.
Ans. SDLC stands for Software Development Life Cycle, which is a process used by software development teams to design, develop, and maintain software applications. It typically consists of several stages, including planning, analysis, design, development, testing, deployment, and maintenance. Each stage involves specific tasks and deliverables, and the overall goal of the SDLC is to ensure that software is developed efficiently, with high quality, and in a way that meets the needs of users and stakeholders. The SDLC is often used in conjunction with project management methodologies to help manage the development process and ensure that projects are completed on time and within budget.

Q4. Why do we need Friend Function and Class?
Ans. Friend functions and classes are used in object-oriented programming to provide access to private and protected data and functions of a class by external functions and classes. Here are a few reasons why we might need friend functions and classes:

  • Friend functions and classes can access the private and protected members of a class, which are not accessible by other functions and classes.
  • Friend functions and classes can be used to provide controlled access to the internal data of a class. This can help to improve encapsulation by allowing external functions and classes to access private members only through a specific interface provided by the class.
  • Sometimes, it can be more convenient to define a related function or class as a friend of a class rather than implementing the same functionality in a separate class or function.
  • Friend functions and classes can help to minimize code duplication by allowing multiple classes to share a common set of functions.

Overall, friend functions and classes can be useful tools for improving code design and encapsulation in object-oriented programming.

Q5. How Method Overriding is different from Method Overloading?
Ans. The main differences between method overloading and method overriding are:

  • Method overloading occurs within the same class, while method overriding occurs in different classes that have an inheritance relationship.
  • Method overloading allows a class to have multiple methods with the same name but different parameters, while method overriding allows a subclass to provide its own implementation of a method that is already defined in its superclass.
  • In method overloading, the methods have the same name but different signatures, while in method overriding, the methods have the same name and signature.

Overall, method overloading and method overriding are both useful features in object-oriented programming that allow developers to reuse code and define multiple methods with the same name.

Q6. What is the difference between “a++” and “++a”?
Ans. Both "a++" and "++a" are increment operators in programming languages like C++ and Java, but they differ in their behavior.

The "a++" operator is the postfix increment operator, which increments the value of "a" after the current expression is evaluated. So if "a" has an initial value of 5, the expression "a++" will evaluate to 5 and then increment the value of "a" to 6.

The "++a" operator is the prefix increment operator, which increments the value of "a" before the current expression is evaluated. So if "a" has an initial value of 5, the expression "++a" will increment as well as evaluate the value of "a" to 6.

Q7. Explain different levels of Programming Languages.
Ans. Programming languages can be classified into four levels based on their proximity to the hardware architecture:

  • Low-level languages: These are programming languages that are very close to the hardware architecture, such as assembly language and machine language. They provide a direct and precise way of communicating with the hardware but are difficult to learn and use. Low-level languages are used to write operating systems, device drivers, and other system-level software.
  • Assembly-Level languages: This language will use mnemonics to reduce program complexity. It is quite similar to computer-understandable machine code, but instead of numbers, it uses words.
  • Middle-Level languages: It interacts with a computer’s abstraction layer and acts as a bridge between high-level and machine-level language. C and C++ are two examples of programming languages.
  • High-level languages: These are programming languages that are designed to be human-readable and easy to use, such as Python, Java, and Ruby. High-level languages are used to develop applications, games, web services, and other software.

Q8. Why is C a Procedural Programming Language?
Ans. C is considered a procedural programming language because it emphasizes procedures (functions) that operate on data, rather than objects or data structures. It uses a top-down approach to problem-solving, dividing a program into smaller, more manageable functions that can be called in a specific sequence to achieve a particular task. C does not support object-oriented programming concepts like encapsulation, inheritance, and polymorphism, which are typically associated with object-oriented programming languages. Instead, C relies on structures to group related data together and provide a level of abstraction.

Q9. What are .dll and .exe File extensions?
Ans. The .dll (Dynamic Link Library) file extension is used for a type of file containing reusable code that can be shared among different programs running on a Windows operating system.

The .exe (Executable) file extension is used for a type of file that contains a program that can be run or executed on a computer, usually associated with the Microsoft Windows operating system.

Q10. What are the advantages of Indexing in SQL?
Ans. Indexing is a powerful technique used in SQL databases to improve query performance and speed up data retrieval. Here are some of the key advantages of indexing in SQL:

  • Faster data retrieval: By creating an index on a column or set of columns, the database can quickly locate the relevant rows, reducing the need for a full table scan and improving query performance.
  • Reduced query time: With faster data retrieval, the database can process queries more quickly, resulting in a reduced query time for the end user.
  • Improved scalability: As the size of the table grows, indexing helps maintain fast and efficient data retrieval, making it easier to scale up the database and support larger workloads.
  • Improved join performance: When joining multiple tables, indexing can help the database quickly locate the matching rows, reducing the need for a full table scan and improving join performance.
  • More efficient sorting: When sorting large result sets, indexing can help the database quickly locate the relevant rows, reducing the need for a full table scan and improving sort performance.

Q11. Explain the Four Major OOPs Concepts in detail.
Ans. The four major Object-Oriented Programming (OOP) concepts are

  • Encapsulation: It is the mechanism of wrapping data and code into a single unit (i.e., class) to prevent unauthorized access and modification. Encapsulation ensures the security and integrity of data and enables better code organization.
  • Abstraction: It refers to the process of hiding implementation details and showing only relevant information to the user. Abstraction provides a simplified view of the system and reduces complexity.
  • Inheritance: It allows a class to inherit properties and behaviors from another class. Inheritance promotes code reuse and helps in creating a hierarchy of related classes.
  • Polymorphism: It is the ability of an object to take on different forms or behave in different ways based on the context. Polymorphism allows for flexible and adaptable code that can work with different data types and structures.

Q12. What are various Access Specifiers present in Java?
Ans. In Java, there are four access specifiers or visibility modifiers:

  • Private: Private members (variables, methods, and inner classes) are accessible only within the same class. They cannot be accessed by any other class, including subclasses.
  • Default (no specifier): Default members are accessible within the same package only. They cannot be accessed by classes in other packages.
  • Protected: Protected members are accessible within the same package and by subclasses in any package. They cannot be accessed by other classes outside the package.
  • Public: Public members are accessible from any class or package. They have the highest level of visibility.

Access specifiers are used to control the level of access to a class’s members, providing encapsulation and data hiding, and helping to enforce the principle of least privilege.

Q13. What are Virtual Functions in C++?
Ans. Virtual functions in C++ are functions that are declared with the virtual keyword in a base class and can be overridden by derived classes. They allow polymorphism, which means that a function call on a base class pointer or reference will call the appropriate function implementation in the derived class, based on the actual object type at runtime. This enables runtime binding and dynamic dispatch, which is essential for implementing abstract classes and interfaces, and for enabling runtime polymorphic behavior in object-oriented programming.

Q14. Difference between DELETE and TRUNCATE commands in SQL.
Ans. DELETE and TRUNCATE are both SQL commands used to remove data from a table, but there are some key differences between them:

  • DELETE is a DML (Data Manipulation Language) command, while TRUNCATE is a DDL (Data Definition Language) command.
  • DELETE removes rows one by one, which can be slow for large tables. TRUNCATE removes all the rows at once, which is faster.
  • DELETE can be rolled back (undone) using a transaction, but TRUNCATE cannot be rolled back.
  • DELETE can be filtered using a WHERE clause to remove specific rows, while TRUNCATE removes all the rows in the table.
  • DELETE maintains the table structure, including any indexes, triggers, and constraints. TRUNCATE drops and recreates the table, which means it also removes all indexes, triggers, and constraints associated with the table.

Q15. Explain left outer join and right outer join in SQL.
Ans. In SQL, an outer join is used to combine rows from two or more tables based on a related column or columns, and it can be divided into two types: left outer join and right outer join.

A left outer join returns all the rows from the left table and matching rows from the right table and returns NULL for any non-matching rows in the right table. The syntax for a left outer join is as follows:

SELECT *
FROM Table1
LEFT OUTER JOIN Table2
ON Table1.column = Table2.column;

In this example, Table1 is the left table, and Table2 is the right table. The "ON" clause specifies the column or columns that the join is based on.

A right outer join, on the other hand, returns all the rows from the right table and matching rows from the left table, and returns NULL for any non-matching rows in the left table. The syntax for a right outer join is as follows:

SELECT *
FROM Table1
RIGHT OUTER JOIN Table2
ON Table1.column = Table2.column;

In this example, Table2 is the left table, and Table1 is the right table. The "ON" clause specifies the column or columns that the join is based on.

Q16. What is a destructor?
Ans. In object-oriented programming, a destructor is a special method that is automatically called when an object is no longer needed or is about to be destroyed. A destructor is the opposite of a constructor, which is called when an object is created.

The purpose of a destructor is to perform any necessary cleanup tasks before the object is destroyed, such as releasing resources like memory, closing open files or database connections, or freeing up any other system resources that the object may have acquired during its lifetime.

In many programming languages, including C++ and C#, the destructor is defined using a special syntax: the destructor method name is the same as the class name, but with a tilde (~) symbol in front of it. For example, in C++, a class named "MyClass" would have a destructor defined as follows:

~MyClass() {
  // cleanup code here
}

Q17. What do you mean by Clustered Index?
Ans. A clustered index is a type of database index in which the table records are physically stored in the same order as the index. This means that the indexed columns are used to determine the physical storage order of the table data on disk. In a clustered index, there can only be one per table, and it is typically created on the primary key column(s) of the table. Because the physical order of the records in a clustered index corresponds to the index order, the clustered index can improve query performance for range queries or queries that retrieve a range of values.

Q18. What are the various Disadvantages of the Waterfall Model?
Ans. Some disadvantages of the Waterfall Model for software development include

  • Lack of flexibility and adaptability
  • Limited opportunities for customer feedback
  • High risk of project failure if requirements are not fully understood at the beginning
  • Late detection of defects and errors
  • Limited visibility and communication between development phases and team members
  • Lengthy development time and high cost of changes
  • Difficulty in accommodating changes in requirements
  • Heavy emphasis on documentation over working software.

Q19. What is a Null Pointer?
Ans. A Null Pointer is a pointer in computer programming that does not point to a valid memory address or object. Instead, it points to a special "null" value, typically represented as 0 or a reserved value that indicates the absence of a value. Dereferencing a null pointer, or attempting to access the memory location it points to, can cause a runtime error or crash the program. It is a common source of bugs in Programming.

Q20. Differentiate between Black Box Testing and White Box Testing.
Ans. Black Box Testing and White Box Testing are two approaches to software testing that differ in their focus and testing methods. Here’s how they differ:

  • Black Box Testing focuses on the functional requirements of the software and tests whether it meets the expected behavior and output. White Box Testing focuses on the internal structure and implementation of the software and tests whether it meets the expected coding standards, quality, and performance.
  • In Black Box Testing, test cases are designed to cover all possible scenarios, inputs, and outputs to ensure that the software meets the functional requirements. In White Box Testing, test cases are designed to ensure that all internal code paths, statements, and branches are tested.
  • Black Box Testing often relies on tools such as test automation software, user interface testing tools, and performance testing tools. White Box Testing often relies on tools such as unit testing frameworks, code coverage tools, and debugging tools.

Conclusion
The technical interview at Infosys is a critical stage in the selection process that evaluates candidates’ technical skills, problem-solving abilities, and understanding of core concepts. In this article, we explored Infosys technical interview questions and provided insights to help you excel in this crucial phase of your journey.

By understanding the types of questions commonly asked at Infosys, including topics like programming languages, data structures, algorithms, database management systems, and software engineering principles, you can tailor your preparation to meet the specific requirements of your desired position.

Frequently Asked Questions (FAQs)

Q1. What kind of technical questions can I expect in an Infosys technical interview?
A: You can expect questions related to programming languages, data structures and algorithms, database concepts, cloud technologies, and software development methodologies. Additionally, Infosys may ask questions related to your specific area of expertise.

Q2. How do I prepare for an Infosys technical interview?
A: To prepare for an Infosys technical interview, you should review your technical knowledge, practice coding exercises, and prepare for behavioral questions. Additionally, research the company and understand its values, culture, and services.

Q3. What programming languages should I be proficient in for an Infosys technical interview?
A: It’s important to be proficient in at least one programming language, such as Java, Python, or C++. However, it’s also important to have a good understanding of multiple programming languages, as you may be asked to work with different languages in your role.

Q4. Will I be asked questions about data structures and algorithms?
A: Yes, data structures and algorithms are common topics in Infosys technical interviews. You may be asked to implement algorithms or solve problems using different data structures.

Q5. Can I expect to be asked about database concepts in an Infosys technical interview?
A: Yes, Infosys may ask you questions about database concepts such as normalization, indexing, and transactions. You should be familiar with SQL and NoSQL databases.

Q6. Can I expect to be asked about my previous work experience in an Infosys technical interview?
A: Yes, Infosys may ask you about your previous work experience, including the technologies you’ve used, the projects you’ve worked on, and the challenges you’ve faced. Be prepared to explain your role in past projects and highlight your accomplishments.

Q7. How should I approach problem-solving questions in an Infosys technical interview?
A: When approaching problem-solving questions in an Infosys technical interview, you should first understand the problem and ask clarifying questions if necessary. Then, break the problem down into smaller parts and develop a plan for solving each part. Finally, implement your solution and test it thoroughly. Be sure to communicate your thought process and reasoning to the interviewer.

Leave a Reply

Your email address will not be published. Required fields are marked *