0% found this document useful (0 votes)
9 views33 pages

Interview Questions

The document provides a comprehensive list of interview questions and answers related to Object-Oriented Programming (OOP), SQL, Java, computer networks, software testing, and programming languages. It covers fundamental concepts, principles, and methodologies in these areas, along with specific technical questions and examples. Additionally, it highlights the advantages and limitations of OOP, the differences between various programming constructs, and the software development life cycle (SDLC).

Uploaded by

ananyagoyalnew1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views33 pages

Interview Questions

The document provides a comprehensive list of interview questions and answers related to Object-Oriented Programming (OOP), SQL, Java, computer networks, software testing, and programming languages. It covers fundamental concepts, principles, and methodologies in these areas, along with specific technical questions and examples. Additionally, it highlights the advantages and limitations of OOP, the differences between various programming constructs, and the software development life cycle (SDLC).

Uploaded by

ananyagoyalnew1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

https://chatgpt.

com/share/66f5ae2a-b4d4-8001-8072-e7e408bd8c3f

Infosys Interview Questions and Answers on OOPs


1. What is an Object in OOPs?

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. What is a Class in OOPs?

A class gives the object's outline and has a fixed data type defined by the user. Member
functions, variables, constants and other functionality are designated within a class. It does not
use any memory during run time. A class can exist without an object, but an object cannot exist
outside the class.

3. What Are The Basic OOPs Principles?

OOPs have four major basic principles:

Abstraction: Abstraction refers to the representation of essential properties without revealing the
entire framework. Problems are solved at the 'abstract' or interface level.

Encapsulation: Data and the corresponding code are 'encapsulated', that is, combined in a
single unit called a class.

Inheritance: The existing class properties are 'inherited' by the new child class. For example, if
there are two separate child classes such as 'Dog' and 'Cat', they can inherit properties such as
'mammals' and 'pets' from the parent 'Animal' class.

Polymorphism: It allows cross-movement between parent and child classes. It is implemented


using overriding and overloading.

4. How is method overloading different from method overriding?


5. What is a constructor?

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.

6. Explain OOPs in Brief.

Object-oriented programming allows programmers to express real-world situations using


objects. An object is any entity that has states and behaviors. Shapes reflect an entity's qualities
or data, whereas procedures describe an item's behaviors. Learners, employees, books, and
other things are objects, and these objects communicate with each other by sending messages.
A class serves as a blueprint for creating objects. To create objects, a type is necessary. For
example, to create an Employee object, there must be an Employee class.

7. Give Reason. Why should we use OOPs?

By packaging together data states and code to modify those data states in OOP coding, you
can keep the intricacies private (Considering an analogy of a car, you can only see the steering
of the vehicle while driving, the circuitry behind it is hidden from you). OOP architecture
consequently results in code that is adaptable, versatile, and expressive. As a result, it is
particularly beneficial for creating more extensive programmes. You can use classes and
objects to implement OOP in your programming. All states and capacities of the category to
which they pertain will be present in the things you generate.

8. What characterizes OOPs as a whole?


Following are some of the critical characteristics of OOPs:

● OOPS allows you to specify the variables of each data item by combining the code into a
single unit. Encapsulation is the process of grouping information into a single unit.
● One can standardize your objects and make your programme easier to use by utilizing
classes. We refer to this as an abstraction.
● More code can be reused when a class can inherit traits and behaviors from other
courses.
● With the aid of polymorphism, numerous objects can be produced from a single, flexible
class of code.

9. Mention some limitations of OOPs.

The following are some typical OOPs limitations:

● More prominent than other programmes in terms of size.


● It was labor-intensive to create, and it ran slower than other programmes.

For some problems, it is improper.


● It needs some adjustment.

Infosys Interview Questions on Database (SQL)


1. What is a database schema?
The database schema represents the overall logical framework of a database. It is an abstract
structure made in one of the formal languages accepted by the database.

2. What are clustered indexes?

A clustered index is used to define the order in which the data will be tangibly stored in the
table. If you add a primary key to a table, it automatically becomes a clustered index,

3. What are SQL triggers?

An SQL trigger is an object that raises an alarm when something happens in a database. For
example, a trigger can be set to record the deletion of an entry from the database.

Infosys Technical Interview Questions on Java


1. How is polymorphism implemented in Java?

Polymorphism can be implemented either through overloading at compile-time or overriding at


run-time. (Continue by elaborating on the differences between overloading and overriding).

2. What is the difference between Stack and heap memory?

● Java Heap Space is leveraged throughout the application, while Stack space is used for
the method/methods running currently.
● Heap Space uses dynamic memory allocation, while Stack is used for storing local
variables during run-time.

Infosys Interview Questions and Answers on Computer Networks and


Software Testing
1. What is the difference between a session and a socket?

A session is a logical connection established between the source and the destination. A socket
is the physical apparatus (an IP address and Port Number) used to implement a session.

2. What is the difference between TCP and UDP?

UDP is a protocol without connection. TCP is connection-oriented. UDP is much simpler, faster
and more efficient than TCP.

3. What is SDLC (Software Development Life Cycle)?

An SDLC presents the life cycle of software in the diagrammatic form. It displays the software's
methods for its complete development, maintenance, requirement analysis, etc.

4. What are the disadvantages of the waterfall model?

● The waterfall model is not user-friendly as it does not consider the end-product from the
user-end.
● It is not flexible in terms of accommodating changes.
● It disallows testing until after the finishing of the project.

5. Explain a network and node.

A network is a collection of gadgets linked together via a physical transmission.

Node is another word for a device that is connected to a network. If two PCs, two machines, and
a web server are all linked to a network, we may say there are five nodes within the network.

6. What are the various testing techniques?

The following are the three different types of software testing:

Black-box Testing is a testing approach that only relies on specifications and requirements. This
approach does not call for any understanding of the internal structures, routes, or
implementations of the software being examined.

White box testing is a testing method that examines the internal code, execution, and integration
routes of the software under test. White box testing typically calls for in-depth programming
abilities.

When using the gray box testing technique to debug software, the tester has little access to the
program's internal workings.

7. What do software testing verification and validation entail?

Confirmation: It is a statically analytical method. Without running the code, Testing is done in
this case. Reviews, inspections, and walkthroughs are a few examples.

Testing is performed by running the code in a dynamic analysis process called validation.
Techniques used in Testing that are functional and non-functional are examples.

The developmental and QA processes are carried out simultaneously under the V model.
Testing does not have a separate phase of its own; instead, it begins with the requirement
phase. The actions of validation and verification are complementary.

8. What varieties of networks are there? Briefly describe each.

Networks come in four main categories.

PAN- The smallest and most basic network form, a personal area network, is frequently used at
home. It is a link between a computer and a different gadget, such as a telephone, printer,
broadband, iPad, etc.

LAN- Local Area Network links a few computers together in office spaces and Coffee shops.
They are typically used to play games or transfer files via a network.

MAN- A more robust network type than LAN is the metropolitan area network (MAN). The MAN
service area includes a small city, town, etc. A massive server is utilized to cover such a vast
area for connection.
WAN- Wide Area Network is more intricate than LAN(Local Area Network) and generally spans
a considerable physical distance. The largest WAN that is globally distributed is the Internet. It
has a distributed ownership rather than single ownership by an organization.

Infosys Technical Interview Questions


1. Explain four major OOP concepts in Java.
Four major concepts related to object-oriented programmings are:

1. Data encapsulation: It refers to combining both data and methods into a single unit
called a class. Data encapsulation helps in hiding the data from an external world.
2. Data abstraction: Representation of essential features excluding their background
details is known as data abstraction.
3. Inheritance: Deriving existing class properties into a new class is called inheritance. A
newly derived class is called the subclass(child class) and the existing class(parent
class) is called the base class. It is helpful for the re-usability of code.
4. Polymorphism: Polymorphism means the ability of an object to take multiple forms. In
java, compile-time polymorphism is achieved with the help of method overloading, and
run-time polymorphism is achieved with the help of method overriding.

2. Can we implement multiple inheritances in Java?


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.

3. How method overloading is different from method overriding?


Method overloading means methods are having the same name, but they differ either in the
number of arguments or in the type of arguments. It is done during compile time, so it is known
as compile-time polymorphism.

Method overriding means the ability to define subclass and super-class methods with the
same name as well as the same method signatures, here the subclass method will override the
super-class method. It is performed during run time, so it is known as run-time polymorphism.

4. Distinguish between classes and interfaces in Java.


5. What are DDL and DML commands in SQL?

● DDL refers to Data Definition Language. DDL commands are used to define database
schema i.e., to create and modify the database object structure in the database.
Examples are CREATE, ALTER, DROP, TRUNCATE, etc.
● DML refers to Data Manipulation Language. DML commands are used to manipulate
the data within the database. Examples are: INSERT, UPDATE, DELETE.

6. Differentiate between TRUNCATE and DELETE commands in SQL.

7. Why indexing in SQL is useful ?


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.

8. Differentiate between DDL and DML commands in SQL.


9. What is the left outer join and the right outer join in SQL?
● Left outer join: It returns an entire set of records from the left table along with the
matched records from the right table.
● Right outer join: It returns an entire set of records from the right table along with the
matched records from the left table.

10. What is stored procedure?


A stored procedure is a logical unit for a group of statements and is available for the
applications that access an RDBMS(Relational Database Management System). These are
stored in the database data dictionary. It can be used for data validation or access-control
mechanisms.

11. Explain pointers in C++.


A variable that holds the address of another variable of the same data type can be called a
pointer. Pointers can be created for any data type or user-defined datatypes like class,
structure, etc. It allows variable passing by references using the address. For example:

Uses of pointers:

● To point a variable present inside the memory.


● To store addresses of dynamically allocated memory blocks.

12. What is meant by a null pointer?


● The pointer that does not point to any memory location is called the null pointer. It
implies the pointer is empty and it is not pointing to anywhere within the memory.
Example: int *pointer=NULL;
● Null pointers can be used for initializing the memory location address with the pointer of
the same data type.
Example: int *pointer= (int*)NULL;

13. What is SDLC(Software Development Life Cycle)?


SDLC is an end-to-end process that defines the software development flow starting from the
requirements stage to the maintenance and support stage. The SDLC stages are requirements
analysis, planning, definition, design, development, testing, deployment, maintenance, and
support.

14. What are the disadvantages of the Waterfall model?


● Working software is produced only at the end of the life cycle
● Not suitable for complex as well as object-oriented projects.
● Difficult to measure progress within each stage
● Not recommended for the projects where requirements are frequent that may lead to a
high risk of changing. So, this model is having a high amount of risk and uncertainty.
● It is difficult to identify any business or technological bottleneck or challenges early
because integration is done at the end.

15. Explain about Agile model.


● Agile is a software development model that has an iterative approach for software
development that helps teams to deliver value to their customers faster, with greater
quality, with lesser errors, greater ability to respond to change.
● An agile team delivers a product in small increments instead of a “big bang” launch.
Requirements, plans, and result evaluation is continuously done, so teams have a
natural mechanism for a quick response to change.
● Scrum and Kanban are the most frequently used Agile methodologies.

16. What is DLL and EXE file extension?


● EXE file extension is used for executable files, it recognizes the file as a program. It runs
independently. An EXE creates separate memory and process space for it.
● DLL stands for a dynamic link library that has functions and procedures used by other
applications. This DLL can be reused by multiple applications. It will share the same
memory and process space of the calling application.

17. What is a frame in HTML?


● HTML Frames are useful for dividing browser windows into many parts where each
section is able to load an HTML document separately. A frame collection in the browser
window is called a frameset.
● It permits authors to present HTML documents in multiple views, which might be
subwindows or independent windows. Multiple views provide help to keep specific
information visible, while other views are replaced or scrollable.

18. Differentiate between white box and black box testing.


19. Explain different levels of programming languages.
The various programming language levels are given below:

● Low-level Language: Language which is directly understood by the machine is known


as the low-level language (binary language or machine language). It is difficult for a
human being to directly read and do coding in this language.
● Assembly level language: This language will make use of mnemonics, which
minimizes the program complexity. It is quite similar to the computer understandable
machine code, but it uses words in place of numbers.
● Middle-level Language: It interacts with the abstraction layer of a computer and binds
the gap between high-level and machine-level language. For example, programming
languages like C and C++.
● High-level language: This is the highest level of the programming language in the
technology, which has strong abstraction from the computer hardware details. That
means this kind of programming language does not require hardware knowledge about
computers. This programming language is simple to learn by human beings as it is in the
human-understandable form. For example, Java, Perl, PHP, Python, etc.

20. Write a Java program to check whether a number is palindrome or not.


import java.util.Scanner;

public class PalindromeNumber {


public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num, n, rem, rev = 0;

// Input a number from the user


System.out.print("Enter a number: ");
num = sc.nextInt();

n = num; // Store the original number for comparison

// Logic to reverse the digits of the number


while (num > 0) {
rem = num % 10; // Get the last digit
rev = (rev * 10) + rem; // Build the reversed number
num = num / 10; // Remove the last digit
}

// Compare the original number with the reversed number


if (n == rev)
System.out.println(n + " is a palindrome.");
else
System.out.println(n + " is not a palindrome.");
sc.close(); // Close the scanner
}
}

4. Why do you want to join Infosys?


This question can be answered by you in the following way- “Infosys is a good company to start
anyone’s career, and it is also recognized as a great place to work. Apart from the opportunity of
working in India’s leading tech company, a job at Infosys comes with a world-class training
program, good value system, great infrastructure and facilities, robust HR policies, attractive
benefits, and a friendly work environment. So these are the main reasons that I want to join
Infosys.”

Infosys Technical Interview Questions

1) What is polymorphism?
Polymorphism is a concept by which we can perform a single action in different ways.
Polymorphism is derived from two Greek words: poly and morphs. The word "poly" means many
and "morphs" means forms. So polymorphism means many forms.

2) Explain the functionality of linked list.


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 is normalization of databases, joins, and keys?


Normalization is also known as the process of organizing data in a DBMS efficiently without any
loss of data.

Advantages of the normalization process are as follows:

First is eliminating redundant data and ensuring data dependencies make sense. It reduces the
amount of space that the database consumes and ensure that data is logically stored.

Join:

This clause is used in DBMS to combine rows from two or more tables, based on a related
column between them.
Keys:

Keys are a crucial part of the relational database model. They are used to identify and establish
relationships between tables. They are also used to uniquely determine each record or row of
data in a table.

Key:

A Key can be a single attribute or a group of attributes acting as a key.

4) What is inheritance?
In, object-oriented programming, inheritance is a mechanism based on classes.

Inheritance refers to inheriting the data members and properties of a parent class to a child
class. A class which is derived from another class is often called as a sub-class, and the class
from which the child class is derived is known as super-class or parent class.

5) What are the different types of inheritance?


Types of Inheritance:

● Single inheritance

A class inherits from one single parent class.

● Multiple Inheritance
A class inherits from more than one parent class.
Not allowed with classes in java but can be handled with interfaces.

● Multi-level Inheritance
A class is derived from another derived class, creating a chain.

● Hierarchical Inheritance
Multiple classes inherit from the same parent class.

6) Demonstrate the process of inheriting variable of one class to other


class?
1. //Base Class
2. class A
3. {
4. public int a;
5.
6. }
7. //Derived Class
8. class B : A
9. {
10. a=15;
11.
12. }

7) What are the loops statements?


To execute a block of statement several times in a program depending upon the conditional
statement loops are used.
The basic structure of a loop is given above in the diagram. For each successful execution of
the loop, the conditional statement should be checked. If the conditional statement is true, then
the loop will be executed. If the conditional statement is false, then the loop will be terminated.

8) Difference between classes and interface?


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.
9) What is software development life-cycle? Also, explain the waterfall
model.
SDLC is a process followed for developing and enhancing software project. It consists of a
detailed plan for developing, maintaining a specific software. The life cycle defines a
methodology process for improving the quality of software and the overall development process.

In "The Waterfall" model, the whole process of software development is divided into separate
phases. In this Waterfall model, typically, the outcome of one phase acts as the input for the
next phase sequentially.

10) What are the four basic principles of OOPS?


The four basic principles of Object-Oriented Programming System are listed below:

1. Abstraction
2. Inheritance
3. Encapsulation
4. Polymorphism.

11) What are the conditional statements?


The conditional statements can alternatively be called a conditional expression also. Conditional
statements are the set of rules which were executed if a particular condition is true. It is often
referred to an if-then statement because if the condition is true, then the statement is executed.

12) What is Database Management System?


A Database Management System is a software system is used for creating and managing
databases. DBMS make it possible for the end user to create and maintain databases. DBMS
provides an interface between the end user/application and the databases.

13) List different advantages of DBMS.


Improved data sharing.

The list of several advantages of Database Management System:


● Improved data security.
● Better data integration.
● Minimized data inconsistency.
● Improved data access.
● Improved decision making.
● Increased end-user productivity.

14) What do you mean by Object-Relational DBMS?


The object-relational database (ORD) is a database management system (DBMS) that are
composed of both an object-oriented database (OODBMS) and a relational database (RDBMS).
ORD supports the essential components of an object-oriented database model in its schemas
and the query language used, such as inheritance, classes, and objects.

An object-relational database is also known as an object-relational database management


systems (ORDBMS).

15) What is database Schema?


It is a set of formulas (sentences) called integrity constraints imposed on a database.

16) What is an IC? What is its importance?


IC refers to integrated circuits sets of electronic circuits on single flat piece semiconductor
material, and usually, silicon is used. The integration of a large number of tiny transistors into a
small chip results in circuits that are smaller in size and faster than those discrete electronic
components. The importance of integrated circuits than the separate electronic components is
integrated circuits are smaller in size, faster, low costs than discrete electronic components.

17) Write a program to check whether the input number is a perfect number
or not.
1. #include <stdio.h>
2.
3. int main()Improved data sharing.
4. {
5. int number, remainder, sum = 0, i;
6.
7. printf("Enter a Number\n");
8. scanf("%d", &number);
9. for (i = 1; i < number ; i=i+1)
10. {
11. remainder = number % i;
12. if (remainder == 0)
13. {
14. sum += i;
15.
16. }
17. }
18. if (sum == number)
19. {
20. printf("Number is perfect number");
21. }
22. else
23. {
24. printf("Number is not a perfect number");
25. }
26. return 0;
27. }

18) Tell me something about DSN?


A Data Source Name as the name suggests it is the logical name for Open Database
Connectivity to refer to other information that is required to access data. For a connection to an
ODBC data source Microsoft SQL Server database.

19) What is the difference between a Clustered-index and a non-clustered-


index?
Clustered Index - Only one per table is allowed

Faster to read than non clustered because the data is physically stored in index order

Non-Clustered Index - Can be used many times in a table

Quicker for inserting and updating operations than a clustered index

20) Difference between C & embedded C.


C Language
1. C is a type of the computer programming language. C was initially developed by Dennis
Ritchie in AT&T Bell Labs between 1969 and 1973. It has a free-format program source
code. C is a general-purpose programming language.
2. C is generally used for desktop computers
3. C can use the resources of a desktop PC like memory, OS, etc.
4. Compilers for C (ANSI C) typically generate OS dependent executables.

Embedded C

1. Embedded C is the set of language extensions for the C Programming language. It was
released by the C Standards committee. Through the Embedded C extensions, the C
Standards committee hoped to address the commonality issues that exist between C
extensions for different embedded systems.
2. Embedded C is for micro-controller based applications.
3. Embedded C is used with the limited resources, such as RAM, ROM, I/Os on an
embedded processor.
4. Embedded C requires compilers to create files to be downloaded to the micro-
controllers/microprocessors where it needs to run.

21) What is a pointer in C? What is its use?


The pointer is a particular variable which holds the address of another variable of the same
type. Pointers can be of any data type and structure are allowed in C programming language.
Pointer variable stores the address of another variable of the same data type as the value of the
pointer variable.

Following are the uses of pointers:

● To point a variable in the memory.


● Pointers are used to traverse the linked list.
● To point out a structure.

22) Difference between a session and a socket?


The Socket is the Combination of Ip address, and Port Number and the session is a Logical
Connectivity between the source and destination.

23) What is a null pointer?


The null pointer is the pointer with no reference to any location of the memory.

A null pointer contains zero as its value which means pointer is empty and not pointing to
anywhere in the memory. Null pointers can be used further in the program to initialize the
address of the memory location with the same data type of the pointer.
Note: Pointers can only point to the variable having the same datatype. If the data type of
pointer and datatype of pointing variable is different, then the pointer will not work.

24) What is a Real-Time OS?


A real-time operating system is an operating system which acts as an interface between
hardware and user. This system guarantees a specific capability within a specified time. For
example, an operating system is designed to ensure that a specific object was available for a
robot on an assembly line.

25) Difference between TCP and UDP.

26) Write a c program to swap two numbers without using a temporary


variable.
1. void swap(int &i, int &j)
2. {
3. i=i+j;
4. j=i-j;
5. i=i-j;
6. }

27) Which functions are used for memory allocation in C/C++


The Function calloc() allocates a memory area, and the length will be the product of its
parameters(it has two parameters). It fills the memory with ZERO's and returns a pointer to the
first byte of the memory. If it fails to locate enough space, Then it returns a NULL pointer.

The function malloc() allocates a memory area, and length will be the value entered as a
parameter. (it has one parameter). It does not initialize memory area free() used to free the
allocated memory(allocated through calloc and malloc), in other words, this used release the
allocated memory new also used to allocate memory on the heap and initialize the memory
using the constructor delete also used release memory allocated by new operator
28) Write output of the program?
1. int i=10;
2. printf("%d%d%d",i,++i,i++);
3. Answer = 10 12 12

29) What is a virtual function and what is the pure virtual function?
Virtual function:- In order to achieve polymorphism, function in base class is declared as
virtual, By declare virtual we make the base class pointer to execute the function of any derived
class depends on the content of pointer (any derived class address).

Pure Virtual Function:- This is a function used in base class, and its definition has to be
provided in a derived class, In other pure virtual function has no definition in the base is defined
as:

1. virtual void fun()=0;

That means this function not going to do anything, In case of the pure virtual function derived
function has to implement the pure virtual function or redeclare it as the pure virtual function

30) What are WPF-WCF?


WPF/WCF application, need in .NET 3.0 Framework. This application will cover the following
concepts:

● WCF(Windows Communication Foundation)


● The new service orientated attributes
● The use of interfaces
● The use of callbacks
● Asynchronous delegates
● Creating the proxy
● WPF( Windows Presentation Foundation )
● Styles
● Templates
● Animations
● Databinding
● Multithreading a WPF application
31) Difference between the EXE and the DLL file extension?
The term EXE is a short-term of the word executable as it identifies the file as a program.
Whereas, DLL stands for Dynamic Link Library, which commonly contains functions and
procedures that can be used by other programs.

32) Scenarios in which the web application should be used and scenarios
in which desktop application should be used?
Scenarios in which web application used are listed below:

● Cost effective development


● Accessible anywhere
● Easily customizable

Scenarios in which desktop application should be used are listed below:

● Desktop application usually has more control.

Safe for computationally expensive software that needs to communicate directly with the OS.

The desktop application is often offline and does not need an Internet connection to function
compared to a web application.

33) What is an array?


An array is a group of elements used to store a group of related data of the same data type.

The array uses index number to identify each element in an array.

34) Inner join Vs. Outer join?


35) What are the SQL tables?
A table is a set of related data in a structured format in the database. A table is consists of rows
and columns.

36) What is the difference between array and pointer?


An array is the group of similar elements having the same data type, whereas the pointer is a
variable pointing to some data type in the memory. Arrays can only contain the elements of
similar data type whereas pointer variable is used to point to any data type variable.

37) How abstraction and encapsulation complementary?


Abstraction and encapsulation are complementary because in object-oriented programming
classes can only be abstracted if it is encapsulated. The abstraction focuses on the observable
behavior of an object, whereas encapsulation focuses on the implementation that gives rise to
this behavior.

38) How is modularity present in C++?


Modularity is the concept explained in oops concept, and it was introduced with class and
objects in c++. Functions, classes, structures implements modularity in C++.

39) Define the structural difference between the b-tree index and bitmap?
Btree

This tree structure was developed by Bayer and McCreight in 1972.

This tree structure is a height-balanced m-way search tree. A B-tree of the order m can be
defined as an m-way search tree.

It is made up of branch nodes and leaf nodes.

Bitmap

It consists merely of bits for every single distinct value. It uses a string of bits to locate rows in a
table quickly. Used to index low cardinality columns.

40) What do you mean by platform independence?


The platform independence refers to the ability of programming language or a platform that you
implement on one machine and use them on another machine without or minimal changes.
There are two types of platform independence, source platform independence, and binary
platform independence. For example, Java is a binary platform independent language whereas
c and c++ are source platform independence languages because java uses java virtual machine
to run their programs but c and c++ use compilers to convert the source code to executable
machine language.

41) Differentiate between Char and Varchar in DBMS?


Char and Varchar both are the datatypes in DBMS. Char and varchar both datatypes are used
to store characters up to 8000. The only point of difference between the Char and Varchar is
Char fixed length string datatype whereas Varchar, as the name suggests, is a variable length
character storing data type.

For example, char(7) will take 7 bytes of memory to store the string, and it also includes space.
Whereas varchar will take variable space, which means that it will only take that much of space
as the actual data entered as the data of varchar data type.

42) Do you know about the different level of languages?


The different levels of programming languages were listed below:

● Low-level Language- Language which is understandable by machine is often known as


machine language (binary language). It is challenging to read and doing code in this
language by humans directly.
● Assembly level language- Some mnemonics are used which reduce the complexity of
the program.
● Middle-level Language- This language is not so tricky as the assembly language, but it
still requires the knowledge of computer hardware which makes it little difficult to
program. For Example C and C++ programming languages.
● High-level language- Its right to say, this level of the programming language is the
highest level of the programming language in the technology. These types of
programming languages do not require the knowledge of the hardware. This level of the
programming language is elementary to learn by the humans. For Example Java, PHP,
Perl, Python, etc.

43) What is the word used for the virtual machine in JAVA? How is it
implemented?
The word "Java Virtual Machine known as JVM in short" is used for the virtual machine in Java.
This word is implemented from the java runtime environment (JRE).

44) List the areas in which data structures are applied extensively?
The list of areas where data structures are applied extensively are listed below:

● Compiler Design
● Operating System
● Database management System
● Numerical analysis
● Artificial Intelligence
● Simulation
● Statistical analysis package

45) Difference between Class and Struct.


A structure and a class differ a lot as a structure has limited functionality and features as
compared to a class. A class can be defined as the collection of related variables and functions
encapsulated in a single structure whereas a structure can be referred to as an user-defined
datatype for processing its operations. A keyword "Struct" is used for declaration of Struct
Where a keyword "class" is used for the declaration of a class in the programming language.
Default access specifier of the class is private whereas default access specifier of the struct is
public. The purpose of the class is data abstraction and further inheritance whereas the use of
the struct is generally, Grouping of data. General usage of the struct is a small amount of data
whereas general usage of the class is to store a large amount of data.

46) What is the difference between a white box, black box, and gray box
testing?
47) Describe three levels of data abstraction? Which layer is at the user
end?
The three levels of data abstraction are listed below:

1. Physical level: This is the lowest level of database abstraction describes how the data
are stored.
2. Logical level: This level is the next higher level than the physical level of database
abstraction, which represents the data stored in the database and what relationship
among those data.
3. View level: This is the highest level of database abstraction describes only part of the
entire database.

No doubt, View level layer of database abstraction is at the user end.

48) Difference between 'Macro' and 'ordinary' definition.


● Macro takes parameters whereas the ordinary definition does not.
● Based on the parameter values to macro, it can result in different value at runtime.
Ordinary definition value remains same at all place at runtime.
● Macro can be used for conditional operations whereas the definition cannot.
● Using macro one can achieve inline functionality in C, i.e., a macro can be a function
performing simple operations. This is not possible using definitions.

49) Write the program in C language to swap two numbers without using a
third variable.
1. #include<Stdio.h>
2. #include<conio.h>
3. void main()
4. {
5. int i,j;
6. printf("Enter the value of i: \n");
7. scanf("%d",&i);
8. printf("Enter the value of j: \n");
9. scanf("%d",&j);
10. printf("Value of i before swap:%d \n",i);
11. printf("Value of j before swap:%d \n",j);
12. i=i+j;
13. j=i-j;
14. i=i-j;
15. printf("Value of i after swap:%d \n",i);
16. printf("Value of j after swap:%d \n",j);
17.
18. }

50) What are IPv4 and IPv6? Differentiate between them.

IPv4 IPv6

IPv4 contains 32 bit Ip address. IPv6 contains 128 bit IP address.

The older version of the IP address. The newer version of the IP


address.

generates 4.29 x 109 unique network produces 3.4 x 1038 addresses


addresses

51) What is the difference and similarity between C and C++?


C and C++ both use the same syntax. C++ is the extension of the C language. C and C++ both
have same compilers. C++ language consists of classes and objects whereas there are no
classes and objects available in the C language. C++ is an OOP based programming whereas
C is not OOPS based programming language.

52) What are the different modulation techniques?


The two types of modulation techniques are an analog and digital modulation. Further analog
modulation is subdivided into amplitude, frequency and phase modulation.

53) Differentiate between 'a' and "a."


"a" is string value whereas 'a' is a character value in c programming language.

54) What is the pre-processor?


The pre-processor is just a text substitution tool, and they instruct the compiler to do required
pre-processing before actual compilation.

55) Write a program in c language to check whether the input number is a


prime number or not.
1. #include<conio.h>
2. #include<stdio.h>
3.
4. int main()
5. {
6. int num,i;
7. int flag=0;
8. printf("Enter the number:");
9. printf("\n");
10. scanf("%d",&num);
11. for(i=2;i<num;i++)
12. {
13. if(num%i==0)
14. {
15. flag++;
16. }
17. }
18. if(flag>0)
19. {
20. printf("number is not a prime number\n");
21. }
22. else
23. {
24. printf("Entered number is an prime number\n");
25. }
26. return;
27. }

56) Tell about normalization and its types and difference between each
using example.

57) aws project which i did, and services which i used.


58) Tell me about clauses (sql)

59) what is collection framework with examples

60) how to use super keyword in java

61) how tcp/ip works

62) SDLC, phases, models

63) What is diamond problem

64) command to make main branch in github

65) difference between azure and aws

66) what is ci/cd

67) difference between avl tree and B tree

68) difference between inorder, postorder, preorder traversal and write


implementation in java

69) difference between node.js and express js

70) join queries and subqueries

71) are you aware of graph data structure

Infosys HR Interview Questions

1) What do you know about our company?


Infosys Limited is an Indian company. The headquarters are in Bengaluru, Karnataka, India.
Company trade name as "Infosys Technologies Limited." This business provides consulting,
information technology and outsourcing services.

2) Introduce yourself and say something apart from your Resume.


I would like to tell you other than what is there in it. I am born and raised in Banaras city. In
Banaras, there are not many good colleges to pursue B.Tech, so I came to Bengaluru for
learning and understanding things. Here, in my early phase I started facing few difficulties but
after some days, I was able to sort out almost every problem. I think, adaptability, quick learning
and problem-solving are my positive points and coming to my weakness I am emotional kind of
person, but this might be helpful in maintaining the proper relationship.

3) Where would you like to work: software development or software


testing?
Note: Answer depending upon the choice of the person giving the interview.

Example 1: I would like to work in software development.

Example 2: I would like to work in software testing.

4) How do you get to know about our company?


Note: The interviewee should not lie while answering such questions. Because an
interviewer is a smart person and they can detect it if you are lying.

Example: I get to know about your company from several online websites.

5) Why have you applied at Infosys?


Infosys is the second-largest revenue earning IT Company in India. Every person wants to work
for your company.

6) Why do you think you are fit for our organization?


I am a hard working person, and my priority is to serve your organization. I can sort out almost
every problem, and I think adaptability, quick learning and problem-solving are my positive
points.

7) Do you have an offer from any other organization?


Note: Interviewee should not lie while answering to such questions because interviewer
can investigate.
Yes, I had many offers from many IT companies like HCL and TCS.

8) Tell us about Infosys and its positioning as compared to its


competitors?
Infosys Limited is an Indian company. The headquarters are in Bengaluru, Karnataka, India.
Company trade name as "Infosys Technologies Limited." This company provides consulting,
information technology and outsourcing services.

Infosys has many competitors, providing the software facilities worldwide. HCL, Wipro, IBM, and
Microsoft were some software companies in competition with Infosys.

You might also like