Excelling Interviews for Specific Roles and Fields

Top 20 Infosys Technical Interview Questions and Answers(2023)

Top 20 Infosys Technical Interview Questions and Answers(2023)


Infosys is a dream of many and cracking its interview is one of the most challenging yet exciting parts of the entire recruitment process. Here, the interviewers are pretty friendly with the candidates and ask many technical questions and some critical HR-related questions to analyze their knowledge. Infosys is not purely technical however, they aim to work on your overall personality and give the required boost. So, if you dream of joining an Indian IT MNC, Infosys might be on your list at the number one position.

To help you with the entire Interview preparation process, Board Infinity has curated the list of top Infosys interview questions and answers that can open the doors of success for you. This list has been compiled based on the past year's interview questions and the most asked questions. So, let’s get started!

1. What are some advanced-level programming languages.

The most popular programming languages are C, Java, C++, Swift, JavaScript, Go, and PHP. (You can also mention the languages you’ve got in-depth knowledge of among these. If you’re prepared with all of them, you would definitely fetch brownie points here.

2. Is C a low-level programming language? If not, then why is it considered so at times?

C continuously supports the high-level programming language actions and is also machine-independent, which is a feature of a high-level language, however, at times it comes under the category of low-level programming languages as it allows direct memory access, raw pointers, and bit-oriented operation.

It has no automatic memory management which confirms its low level. Depending on its comparison with other languages, it can be classified sometimes as high level, if compared to ‘Assembly’, but low level if compared to JavaScript. It is subjective and therefore would be better classified as a mid-level language.

3. Mention the preprocessor of C.

The preprocessor does not come as a part of the compiler. However, it is a separate step during compilation. Commands mentioned at the top of the program code, which starts with the symbol ‘#’ are called the preprocessor of C. In layman language, it is a tool that is used to substitute text, which dictates the compiler to pre-process before the final compilation.

4. What are the basic OOPs concepts?

The basic OOPs concepts include Encapsulation, Polymorphism, Inheritance, and Abstraction.

Inheritance is the process by which one class assumes or inherits the characteristics, methods, and properties of another class. Along with the inherited characteristics also exist new and different characteristics.

Encapsulation is, in essence, the concept of security. It helps in hiding the data from unauthorized users.

Polymorphism refers to the concept of giving the functions different functionalities but the same name.

Abstraction is a concept that hides the executions of the functions and only showcases the functionalities.

5. Explain Inheritance.

Inheritance can be described as one of the most important components of the language OOPs. It is the process by which one class assumes or inherits the characteristics, methods, and properties of another class, which basically allows you to reuse a code instead of writing it anew.

6. Please list the different types of inheritance.

There are six types of inheritance.

  • Single Inheritance
  • Multiple Inheritance
  • Multi-level Inheritance
  • Hierarchical Inheritance
  • Hybrid Inheritance

7. Mention the tokens in C++

In C++, tokens are the tiniest elements that together make much more sense to the compiler. Literals, operators, Identifiers, keywords, separators, and punctuations are common examples of tokens.

8. Give some differences between Java and C++

Parameters

C++

Java

Platform dependency

C++ is platform-dependent.

Java is platform-independent.

Usages

C++ is majorly used for the  Windows software.

Java is mainly used for building applications for web applications and other different platforms.

Multiple Inheritance

C++ provides unmatched support to multiple inheritances.

In Java, there is absolutely no support for multiple inheritance. For this reason, it has the concept of interfaces.

9. Give some differences between C and C++ Give some differences between C and C++

C

C++

C can be defined as a procedural language, therefore, there is absolutely no concept of classes, inheritance, objects, encapsulation, and polymorphism.

C++ can be defined as an Object-Oriented language. Some of the essence of OOPS are encapsulation, inheritance, and polymorphism.

The dynamic memory allocation is completed through calloc() and malloc() functions

The memory allocation is completed with the help of ‘new’ operator.

The main function in the C programming language can be referred from any other functions.

The main function in the C programming language cannot be referred to from any other functions.

No function and operator overloading.

In C++, operator overloading and function overloading is easier to implement.

In C, you can run the C++ code. 

In C++, you can run the C code.

Virtual, friend functions, and reference variables are not supported.

In C++, all of these are supported.

10. What are the examples of data structures in C++?

When talking about C++, there are two different types of data structures in C++ namely linear and non-linear

  • In linear C++, the data elements are placed in a sequence. Examples of it are linked list, queue, and stack.
  • In non-linear C++ the graph and tree are not placed sequentially.

11. Give one disadvantage of using C++

In C++, there is no support for the threads. This is a major disadvantage as this function exists in other languages. The absence of this not only makes the process extremely slow but also makes it extra complicated.

12. Explain the SQL join?

The join is used for getting results from several tables using the foreign and primary keys of the related tables and combining the rows of the tables. For example -

table – student

table - books

student_id (primary key)

book_id (primary key)

student_name

book_title

student_batch

student_id (foreign key)

student_department

book_author

For getting the book name that the student has taken, the query can be simply written as -

select student.student_batch,  student.student_name, a book where student.student_id = book.student_id,  book.book_title, book.book_author from student:

The result will appear as  -

student_name

student_batch

book_title

book_author

Karan

2008

C++ for beginners

Yashwant Kanetkar

Karan

2008

Java for dummies

Kathy Sierra

13. Tell us the full form of HTML.

HTML stands for Hypertext Mark-up Language.

14. List three differences each between heap and stack memory.

Heap memory  

Stack memory 

  • JRE uses the heap memory for allocation of JRE and objects classes.


  • Short term references such as the current thread of execution.

  • On the heap memory, the garbage collection is done. 



  • The references to the heap object are kept back in the stack.

  • Objects which are developed on heap can be accessed globally

  • When a method is called, it leads to the creation of a new memory. Once the method is finally executed, the block is further taken into consideration by the upcoming program.


15. Explain how the polymorphism is implemented in Java?

There are two ways for the polymorphism implementation in Java. These include dynamic polymorphism or Method overloading.

Here is the example of Method overloading -

The output of these two code sources will be “Welcome to IndianPizza, fresh dough is ready!”

16. Give us in writing a program to state that the given number is a prime number.

Let’s imagine that the given number is 47.

17. Give us a difference between ArrayList and Array

Here are the differences between ArrayList and Array -

  • The ArrayList can grow immensely. However, the Array has only a fixed length.
  • On the one hand, the ArrayList cannot store any primitives. On the other hand, it's the opposite with the Array as it can easily store primitives.

18. Give us some differences between Windows and DOS

Parameters

DOS

Windows

Multi-threading

DOS is referred to as the single-tasking OS.

Windows is specially designed for performing several tasks.

User interface

DOS uses a simple and easy-to-use interface. In short, the console.

Windows uses a graphical interface.

Operation

Operating DOS can be tedious as you need adequate knowledge of each and every command.  

Windows are extremely easy to use and run as it offers a graphical interface.

Features

DOS allows playing games, music, and so on.  

Windows also provides features such as paying music and video games. 

Performance

As compared to Windows, DOS has a better speed.

In comparison with DOS, Windows offer extremely slow speed.

19. Give some differences between the varchar and char in DBMS

Char

Varchar

The Char keeps a character string along with the fixed length.

Varchar keeps a character string as well; however, it is of variable length.

Char holds the maximum limit of only 255 characters.

Varchar has the maximum  character limit of 65,535 characters.

As compared to Varchar, Char is 50% faster.

As compared to Char, Varchar is slower.

Char prefers using the static memory allocation technique.

Varchar prefers using the dynamic memory allocation.

20. Name three types of loops in Java.

The three types of loops in Java can be the While loop, For loop, and finally, Do While loop.

For loop is an entry-controlled loop. It allows a user to carry out a block of a statement(s) repeatedly with a static number of tries on the basis of the expression of the test or the conditions of the test.

While loop is also an entry-controlled loop. It repeats while the condition of the test and the expression of the tests estimate to be true.

Do-while loop, differing from the while loop and the for loop, is an exit-controlled loop. It evaluates its expression or the condition of the test after executing the statements in the loop-body, at the bottom of the loop.

Conclusion

Today, we listed some of the most frequently asked questions while appearing for the Infosys Interview. Over the years, it has been recorded that most of the questions have been asked from C and C++ along with OOPs concept, the basis of programming languages, and other technical stuff that every developer should know.

If you want to crack your dream job interview, check out the Board Infinity's completely free Interview preparation course, which gives you 15 hours of power-packed material to help you get ready for your Placements (or change in career path). It will help you build the right knowledge, skills, and attitude for being a step ahead in the selection process and ensure that you are corporate ready!