This article will discuss the most common Infosys interview questions that will help you prepare for an interview at Infosys. These questions are among the most asked Infosys interview questions.
At Infosys, there are two separate interviews, so in this article we will have two separate parts on for Infosys interview questions - Technical and one for Infosys interview questions- HR.
Infosys Interview Questions - Technical
The Infosys interview questions - Techincal are to check your technical knowledge and basic computer programming skills. The topics generally are DBMS, OOPs, language-specific, operating system, computer networks, SQL, data structures and whatever else you have mentioned on your resume.
Let's discuss some of the most asked technical Infosys interview questions.
What do you understand by Polymorphism?
Polymorphism is the concept of having multiple functions or forms with the same name. There are two types of Polymorphism - Compile time and Run time Polymorphism. In C++, Compile time Polymorphism is achieved by function overloading and operator overloading, and Run time Polymorphism is achieved by function overriding, which is implemented using virtual functions.
How is encapsulation achieved in C++?
Encapsulation is the idea of wrapping up data in a single unit and hiding up the internal working of the data to the end-users. In C++, it is done using the three access specifiers - public, private and protected. When we set the data members as private, they can not be accessed outside the class, and to access them, we have to use getters and setters.
What are the four pillars of object-oriented programming?
Following are the four pillars of object-oriented programming:
- Encapsulation is the concept of wrapping up data in a single unit and hiding up the internal working of the data to the end-users.
- Inheritance is the capability of a class to inherit the properties and functions of another class leads to code reusability.
- Abstraction is the concept of hiding unnecessary information and only showing the relevant and important things upfront.
Polymorphism is the ability to have multiple functions or forms with the same name.
How is a drop command different from a truncate command?
Drop command is a DDL(data definition language) command used to delete a table or a view in a database. It removes the logical schema of the table or view from the database. In contrast, the truncate command is used to empty the table or view. In the truncate command, the table's schema is not removed from the table.
How is a candidate key different from a super key?
A super key is a collection of one or more attributes that uniquely identifies any tuple in a database. A candidate is a minimal super key. It is a set of one or more attributes that are necessary to uniquely identify any tuple. A candidate key is a minimum necessary subset of a super key.
What is Database Management System?
A Database Management System is a system tool that allows us to store, access, manipulate, and share data efficiently and conveniently. It makes the storage of related data and accesses easy.
What are the advantages of DBMS?
DBMS provides the following advantages:
- Data security
- Atomicity of update
- Concurrent access by multiple users
- Reduces Redundancy
- Ensures Consistency
- A mechanism for Recovery and Backup
What are the different languages used to interact with databases?
We have Data Definition Language(DDL), Data manipulation language (DML), Data Control Language(DCL), Transaction Control Language(TCL).
Must Read Topic: Azure Data Engineer Interview Questions
What are virtual functions and pure virtual functions?
- Virtual function: Virtual functions are used to achieve runtime polymorphism. A function has to be defined as virtual in the base class to let the pointer of the base class that is pointing to an object of the derived class use the functions of the derived class even in the presence of a function with the same name in the base class.
Pure virtual function: These are also defined in the base class. The syntax of defining a function as a base class is : virtual void function_name() = 0; If we define a function as a pure virtual function, then all the classes that inherit from this class have to have a function with the same name as that of the pure virtual function.
What are control statements or condition statements, or flow control methods in C++?
In C++, the program starts its execution with the main function and then execute line by line. Control statements are used to alter the flow of control in a program. Selection and iterative statements are used to control the flow of execution in a program.
The selection statements are for decision making based on a condition. This can be done using if-else statements and switch statements.
Iterative statements are used to repeatedly execute a certain part of the program until a condition is met. This is done by for loops, while loops and do-while loops.
What do you mean by an array?
An array is a data structure where the elements are stored linearly. It is used to store elements of the same type. The array elements are stored at contiguous memory locations.
What is the difference between 'a' and "a"?
In C++, single quotes are used to specify a single-letter character, whereas double quotes are used to specify a string that is a sequence of characters. Therefore, here 'a' means character a and "a" means a string a.
How are structure and class different?
A structure is a user-defined data structure used to group the data in a single unit. A class is defined as a collection of related data and functions wrapped in a single unit. A structure has limited functionality, whereas a class has all the object-oriented programming functionalities. A class can be inherited from another class, but a structure cannot. The access specifier of a class is private by default, and that of the structure is public.
What do you understand by Null pointer?
A null pointer in C++ is a pointer that does not point to any memory location. It specifies that the pointer is empty and does not point anywhere within the memory location. These are used to initialize a pointer with the same type.
What is the difference between TCP and UDP?
The difference between TCP and UDP are :
- TCP is a connection-oriented protocol, whereas UDP is a connection-less protocol.
- TCP is more reliable than UDP because it guarantees data delivery to the destination.
- TCP provides an acknowledgment segment. UDP has no acknowledgment segment.
- TCP has better error-handling methods because it provides a flow control mechanism and acknowledgment. UDP has only basic error-handling methods using checksums.
A sequence is maintained in TCP, whereas no arrival sequence of data is maintained in UDP.
Tell the difference between IPv4 and IPv6?
- IPv4 has a 32-bit address length, whereas IPv6 has a 64-bit address length.
- IPv4 can generate 4.29 x 109 unique addresses, and IPv6 can be used to generate as large as 3.4 x 1038 unique addresses.
- Address representation in IPv4 is in decimals, and that in IPv6 is in hexadecimal.
- IPv4 is an older version, and IPv6 is the newer version.
The encryption and authentication facilities are not provided in IPv4, but IPv6 provides it.
How can you write a program to swap two numbers without using any temporary space?
A program to swap two numbers without using any temporary or extra space is: Suppose we are given two numbers, a and b, that we need to swap, then following three operations when done in order will swap these two numbers.
- a = a+b;
- b = a - b;
a = a - b;
What are the different access specifiers in C++?
In C++, we have public, private and protected access specifiers.
What do you mean by RDBMS?
RDBMS is an abbreviation for a relational database management system. It provides us with the tools and mechanism to store, access and manipulate our data with the help of queries(SQL). In RDBMS, all the data is stored in rows and columns in the form of a table.
What are triggers in SQL?
Triggers are the stored procedures that are invoked automatically when we insert, update or delete any data from any table in a database. These are used to minimize the anomalies that arise due to data manipulation.
What do you understand by SDLC(software development life cycle)?
Software development life cycle(SDLC) is an end-to-end process of software development, starting from the planning stage and ending with the maintenance phase. The stages in SDLC are :
- Testing and Integration
What are any two differences between C++ and Java?
- C++ is a platform-dependent programming language that needs to be compiled for different platforms. In contrast, Java is platform-independent as java byte-code can be executed on any platform.
C++ is only a compiled language, whereas Java is both compiled and interpreted.
What do you understand by linked list?
Linked-list is a linear data structure where elements are stored at non-contiguous memory locations. Every node in a linked list consists of a data part and a link that gives the address of the next node in the given linked list.
What are the different levels of language?
The different levels of language include the following:
- Low-level language is the closest language to a machine and is understandable by machines. It is binary code that is 0 and 1. It is difficult for humans to code directly in a low-level language.
- Assembly level language: It uses some mnemonics to reduce the complexity of the programs, but it is still hard to code in it.
- Middle-level language: It is not as complex as the assembly level language, but it still requires knowledge of computer hardware. Examples of middle-level programming languages are C and C++.
High-level language: These are the highest level of programming languages closest to human language. It is not required to know computer hardware details and is comparatively easier to understand and learn. Examples are Python, Java, PHP, etc.
What is a real-time operating system?
A real-time operating system provides an interface between the user and the computer hardware. Real-time operating systems are meant to handle mission-critical tasks. They are highly responsive and has a fast processing time. However, the functionalities are limited and specific to the domain. Examples of real-time operating systems are robots, defence systems, air-traffic control, etc.
To learn about Html interview questions check this out.
Must Read Web Developer Interview Questions