Infosys Interview Questions and Answers

This website contains Infosys interview questions with answers. We have given Infosys interview questions faced by freshers and experienced in real interviews. Dear readers, these Infosys Interview questions have been specially designed so that you can get acquainted with the nature of the questions you may be ask during your interview.

1. What is an Object in OOPs?

Answer:-An object is an instance or subset of the class. It is attributable to a physical operation such as individual attributes, properties and behavior. It occupies space in the memory and has member functions defined in a class.

2. Explain the functionality of linked list.

Answer:- A linked list consists of two parts. Information part and the link part. In the single linked list, first node of the list is marked by a unique pointer named as start and this pointer points to the first element of the list, and the link part of each node consists of a pointer pointing to the next node, but the last node of the list has null pointer identifying the last node. The linked list can be traversed easily with the help of Start pointer.

3. What are Structs and how are they different from Classes?

Answer:- Struct is a customized data type that contains other data types.
Members of a class are private by default, to make a variable public, we need to add the public modifier. In a struct, by default members are public and if we need any private members, we have to use a modifier.
A class can be inherited but structs cannot.

4. What are DDL and DML commands in SQL?

Answer:- DDL stands for Data Definition Language. DDL commands are used to define database schema, that is, to create and modify the database object structure. CREATE, ALTER, DROP, TRUNCATE, and so on are examples.
DML stands for Data Manipulation Language. DML commands are used to manipulate data in a database. INSERT, UPDATE, and DELETE are a few examples.

5. Can we implement multiple inheritances in Java?

Answer:- Java does not directly support multiple inheritances. But we can achieve multiple inheritances with the help of an interface. It is possible to implement multiple interfaces into our program.

6. What is a constructor?

Answer:- Constructors are used to initialize the data members of a new object. It prepares the object for run-time operation using keywords and member variables.

7. Difference between classes and interface?

Answer:- The difference between classes and interface are listed below:
The instance of the class can be created by creating its object, whereas interfaces cannot be instantiated as all the methods in the interface are abstract and do not perform any action, There is no need for instantiating an interface.
A class is declared using class keyword whereas an interface is declared using interface keyword.
The members of the class can have access specifier such as public, protected, and private but members of the interface cannot have the access specifier, all the members of the interface is declared as public because the interface is used to derive another class. There will be no use of access specifies inside the members of an interface.
The methods inside the class are defined to perform some actions on the fields declared in the class whereas interface lacks in declaring in fields, the methods in an interface are purely abstract.
A class can implement any number of the interface but can only extend one superclass, whereas interface can extend any number of interfaces but cannot implement any interface.
A class can have a constructor defined inside the class to declare the fields inside the class, whereas interface doesn't have any constructor defined because there are no fields to be initialized.

8. What is the difference between reference and pointer?

Answer:- Pointer stores the address of a variable, but the reference is just a copy of a variable with a different name. References have to be initialized, whereas pointer need not be. To initialize pointer, we use the dereference operator.

9. What is the Agile model.

Answer:- The Agile model is a combination of two of iterative and incremental software development. The agile model divides requirements into many parts, known as iterations, and then develops them incrementally. Each iteration in this model is planned, designed, implemented, tested, and deployed to customers for feedback. If any changes are required, they are made during that iteration, and the project is then continued. Any error can be fixed at each iteration, so the presence of errors in the project is not an issue.

10. Why indexing in SQL is useful ?

Answer:- A SQL index is a quick lookup table that helps to find records that are frequently searched by a user. An index is fast, small, and optimized for quick look-ups. It is useful for establishing a connection between the relational tables, searching large tables, and fast retrieval of data from a database.


* You must be logged in to add comment.