0% found this document useful (0 votes)
42 views36 pages

C Programming

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 36

Interview Questions

Subject: ‘C’ Language

Question 1: Why is C called procedural language?


Answer: Because C programs follow a procedure of steps written in it, called functions. It follows a top-
down approach i.e. much importance is given to flow of program rather than on data on which functions
operate. On the other hand, Java/C++ are object oriented languages. They have a bottom up approach.

Question 2: What is the difference between procedural and object oriented programming? [Infosys]
Answer:
Procedural – follows a step-by-step approach to break down a task into a collection of variables and
routines (or subroutines) through a sequence of instructions. Each step is carried out in order in a systematic
manner so that a computer can understand what to do. The program is divided into small parts called
functions and then it follows a series of computational steps to be carried out in order. It follows a top-down
approach to actually solve a problem, hence the name. Procedures correspond to functions and each function
has its own purpose. Dividing the program into functions is the key to procedural programming. So a number
of different functions are written in order to accomplish the tasks.
Object Oriented – OOP is a high-level programming language where a program is divided into small
chunks called objects using the object-oriented model, hence the name. This paradigm is based on objects
and classes.

Object – An object is basically a self-contained entity that accumulates both data and procedures to
manipulate the data. Objects are merely instances of classes.
Class – A class, in simple terms, is a blueprint of an object which defines all the common properties of one
or more objects that are associated with it. A class can be used to define multiple objects within a program.
The OOP paradigm mainly eyes on the data rather than the algorithm to create modules by dividing a
program into data and functions that are bundled within the objects. The modules cannot be modified when a
new object is added restricting any non-member function access to the data. Methods are the only way to
assess the data.

Question 3: Why do you use stdio.h before the program? [Infosys]


Answer: stdio stands for “standard input output”. So, #include is like including this standard input output
library for your part of code. This way, you can use the IO functions available viz. printf and scanf. Since this
is done before your code processing starts, it’s a pre-processor directive.
Question 4: What is the use of return 0? [Infosys, TCS]
Answer: In C and C++ programs, generally the main function is of type int and therefore it should return an
integer value. The return value of the main function is considered the “Exit Status” of the application. So if
we return 0 then the programs completes with integer return type.
Question 6: What is the use of getch() function?
Question 7: What is a do while loop?
Question 8: What is a switch case?
Question 9: Who created C language?
Question 10: Why is the use of printf?
Question 11: Difference between int and double?
Question 12: What are the limits of int datatype?
Question 13: What is the size of char data type?
Question 14: What is a data type?
Question 15: What is a pointer on pointer?
Answer: It’s a pointer variable which can hold the address of another pointer variable. It de-refers twice to
point to the data held by the designated pointer variable. Eg: int x = 5, *p=&x, **q=&p; Therefore ‘x’ can be
accessed by **q.
Question 16: Can a program be compiled without main() function? [Infosys, TCS]
Answer: Yes, it can be but cannot be executed, as the execution requires main() function definition.
Question 17: What is the difference between local variable and global variable in C?
Answer:
Local variable: A variable which is declared inside function or block is known as local variable.
Global variable: A variable which is declared outside function or block is known as global variable.
Question 18: What is recursion in C?
Question 19: What are the usage of pointer in C? [Infosys, TCS]
Answer:
Accessing array elements
Dynamic memory allocation
Call by Reference
Data Structures like tree, graph, linked list etc.
Question 20: What is NULL pointer in C? [Infosys, TCS]
A pointer that doesn’t refer to any address of a value but NULL, is known as NULL pointer. For example: int
*p=NULL;

Subject: Data Base Management System

Question 1: What is database?


Answer: A database is a logically coherent collection of data with some inherent meaning, representing some
aspect of real world and which is designed, built and populated with data for a specific purpose.

Question 2: What is a Database system?


Answer: The database and DBMS software together is called as Database system.

Question 3: What are the advantages of DBMS?


Answer: The advantages of DBMS are as follows:
1. Redundancy is controlled
2. Unauthorised access is restricted
3. Providing multiple user interfaces
4. Enforcing integrity constraints
5. Providing backup and recovery

Question 4: What is normalization? [TCS, Wipro, Infosys]


Answer: It is a process of analysing the given relation schemas based on their Functional Dependencies
(FDs) and primary key to achieve the properties
• Minimizing redundancy
• Minimizing insertion, deletion and update anomalies.

Question 5: What is DDL (Data Definition Language)?


Answer: A data base schema is specifies by a set of definitions expressed by a special language called DDL.

Question 6: What is Functional Dependency?


Answer: Functional Dependency is the starting point of normalization. Functional Dependency exists when a
relation between two attributes allows you to uniquely determine the corresponding attributes value.
Question 7: What is 2NF?
Answer: A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully
functionally dependent on primary key

Question 8: What is the difference between primary key and unique constraints? [Infosys, TCS]
Answer: Primary key cannot have NULL value, the unique constraints can have NULL values. There is only
one primary key in a table, but there can be multiple unique constrains.

Question 9: What is SQL?


Answer: SQL is Structured Query Language designed for inserting and modifying in a relational database
system.

Question 10: What is a view in SQL? How to create one


Answer: A view is a virtual table based on the result-set of an SQL statement. We can create using create
view syntax.
CREATE VIEW view_name AS SELECT column_name(s)
FROM table_name WHERE condition

Question 11: What is Unique key constraint?(90% asked in Interview Questions for TCS)
Answer: The UNIQUE Constraint uniquely identifies each record in a database table. The UNIQUE and
PRIMARY KEY Constraints both provide a guarantee for Uniqueness for a column or set of columns. A
PRIMARY KEY Constraint automatically has a UNIQUE Constraint defined on it.
Note: You can have many UNIQUE Constraints per table, but only one PRIMARY KEY Constraint per
table is allowed.

Question 12: How to select first 5 characters from First name in Employee table?
Answer: Oracle Query:
Select Substr(0,5) from Employee;

Question 13: How to fetch all the records from Employee whose joining year is 2017?
Answer: Oracle:
select * from Employee where To_char(Joining_date,’YYYY’)=’2017′;

Question 14: What is mean by Sequence in database?(80 % asked in Interview Questions for TCS)
Answer:
Use the CREATE SEQUENCE statement to create a sequence, which is a database object from which
multiple users may generate unique integers. You can use sequences to automatically generate primary key
values. When a sequence number is generated, the sequence is incremented, independent of the transaction
committing or rolling back.
Once a sequence is created, you can access its values in SQL statements with the CURRVAL Pseudo
Column, which returns the current value of the sequence, or the NEXTVAL Pseudo Column, which
increments the sequence and returns the new value.

Question 14: What is join in SQL?(100% asked in Interview Questions for TCS)
Answer:
The most used concept in real life scenarios are nothing but SQL Joins.Although in reporting,stand alone
applications development,Web application development the concept of join is really important. Joins are
nothing but combining the records from two or more tables.
There are following 2 types of joins:
1. Joins using Operators -> Equi Join,Non Equi Join
2. Joins using Concept-> Inner Join,Outer Join,Cross Join,Self Join.

Question 15:.What is view in SQL?(100% asked in Interview Questions for TCS)


Answer:
Views in SQL is nothing but the logical table created from one or more tables.We can use the views to fetch
the columns from one or more different tables at a time.In real life specifically views are used in Reporting
purpose.To create a report we need data from different tables and need to show it on a single dashboard so
we are using the views to fetch the data from different tables. View can contain all rows from the table or
selected rows from the table.

Question 16: How to find all details about Constraint?


Answer:
To find details about constraint following query is used:
1. Select * from User_constraints;
2. Select * from User_cons_columns;

Question 17: How to Find the Sequence information?


Answer:
To Find the Sequence information following query is used:
Select * from User_Sequences;

Question 19: Write an SQL SELECT statement to count the number of rows in STUDENT table and display
the result with the label NumStudents.
Answer:
SELECT COUNT(*) AS NumStudents FROM STUDENT;

Question 20: What is a foreign key, and what is it used for?


Answer:
A foreign key is used to establish relationships among relations in the relational model. Technically, a
foreign key is a column (or columns) appearing in one relation that is (are) the primary key of another table.
Although there may be exceptions, the values in the foreign key columns usually must correspond to values
existing in the set of primary key values. This correspondence requirement is created in a database using a
referential integrity constraint on the foreign key.

Question 21: What does it mean when we say that a relation is in Boyce-Codd Normal Form (BCNF)?
Answer:
A relation is in BCNF when every determinant in the relation is a candidate key. This means that any
possible primary key can determine all other attributes in the relation. Attributes may not be determined by
non-candidate key attributes or part of a composite candidate key.

Question 22: What is a cascading update?


Answer:
Referential integrity constraints require that foreign key values in one table correspond to primary key values
in another. If the value of the primary key is changed -- that is, updated -- the value of the foreign key must
immediately be changed to match it. Cascading updates will set this change to be done automatically by the
DBMS whenever necessary.

Question 23: Explain what we mean by an ACID transaction. [Infosys, TCS, Wipro]
Answer:
An ACID transaction is one that is atomic, consistent, isolated, and durable. Durable means that database
changes are permanent. Consistency can mean either statement level or transaction level consistency. With
transaction level consistency, a transaction may not see its own changes. There are four transaction isolation
levels: read committed, read uncommitted, repeatable read and serialization. Atomic means it is performed as
a unit.

Question 24: Briefly describe the four JDBC driver types that Sun defines. [Infosys, TCS, LG Soft]
Answer:
Type 1 drivers provide a bridge between Java and ODBC. Types 2-4 drivers are written entirely in Java, but
differ as to how they connect to the DBMS. Type 2 drivers rely on the DBMS product for inter machine
communication, if any. Type 3 drivers translate JDBC calls into a DBMS-independent network protocol.
Type 4 drivers translate JDBC calls into a DBMS-dependent network protocol.

Question 24: What is OLAP?


Answer:
OnLine Analytical Processing (OLAP) is a Business Intelligence (BI) reporting system. OLAP provides the
user with the capability to sum, count, average and do other simple arithmetic operations on groups of data.
An OLAP report has measures and dimensions. Measures are the data values to be displayed. Dimensions
are characteristics of the measures. OLAP reports are called OLAP cubes, although such reports are not
limited to three dimensions.
Question 25: Compare a hierarchical and network database model?
Answer:
The hierarchical model is a top-down structure where each parent may have many children but each child
can have only one parent. This model supports one-to-one and one-to-many relationships. The network
model can be much more flexible than the hierarchical model since each parent can have multiple children
but each child can also have multiple parents. This model supports one-to-one, one-to-many, and many-to-
many relationships.

Question 26: Describe the difference between embedded and dynamic SQL.
Answer:
Embedded SQL is the process of including hard coded SQL statements. These statements do not change
unless the source code is modified. Dynamic SQL is the process of generating SQL on the fly. The
statements generated do not have to be the same each time.

Question 27: Write Sql query to display the second highest salary of the employee.
Answer:
SELECT sal FROM emp ORDER BY sal DESC LIMIT 1, 1;

Question 28: Get employee details from employee table whose first name starts with 'J'.
Answer:
Select * from EMPLOYEE where FIRST_NAME like 'J%'

Question 29: Select TOP N salary from employee table


Answer:
SQL Queries in Oracle, select * from (select * from employee order by SALARY desc) where rownum <N
+1

Subject: Data Structures

Question 1: What is Data Structure?

Answer: Data structure refers to methods of organizing units of data within larger data sets. Achieving and
maintaining specific data structures help improve data access and value. Data structures also help
programmers implement various programming tasks.

Question 2: List out the areas in which data structures are applied extensively?

Answer: The name of areas are:

a. Compiler Design
b. Operating System
c. Database Management System
d. Statistical
e. Analysis Package
f. Numerical Analysis
g. Graphics
h. Artificial Intelligence
Question 3: What are linear and Non Linear data Structures?

Answer:

Linear Data Structures: Those data structures where the data elements are organized in some sequence is
called linear data structure. Examples of linear data structures are array, stacks, queue, and linked list.

Non Linear Data Structures: When the data elements are organized in some arbitrary function without any
sequence, such data structures are called non-linear data structures. Examples of such type are trees, graphs.

Question 4: What are the major data structures used in the following areas: RDBMS, Network data model
and Hierarchical data model?

Answer: The major data structures used are as follows:

· RDBMS – Array (i.e. Array of structures)

· Network data model – Graph

· Hierarchical data model – Trees

Question 5: If you are using C language to implement the heterogeneous linked list, what pointer type will
you use?

Answer: The heterogeneous linked list contains different data types in its nodes and we need a link, pointer
to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is
capable of storing pointer to any type as it is a generic pointer type.

Question 6: Minimum number of queues needed to implement the priority queue?

Answer: Minimum number of queues needed to implement priority queue is two. One queue is used for the
actual storing of data, and the other one is used for storing the priorities.

Question 7: What is the data structures used to perform recursion? [Infosys, TCS,Webkul]

Answer: Stack has the LIFO (Last In First Out) property; it remembers it's ‘caller’. Therefore, it knows to
whom it should return when the function has to return. On the other hand, recursion makes use of the system
stack for storing the return addresses of the function calls.

Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent
iterative procedures are written explicit, stack is to be used.

Question 8: What are the notations used in Evaluation of Arithmetic Expressions using prefix and
postfix forms?

Answer: Polish and Reverse Polish notations.

Question 9: Convert the expression ((A + B) * C - (D - E) ^ (F + G)) to equivalent Prefix and Postfix
notations.

Answer: Prefix Notation: ^ – * +ABC – DE + FG

Postfix Notation: AB + C * DE – – FG + ^

Question 10: Sorting is not possible by using which of the following methods? (Insertion, Selection,
Exchange, Deletion)
Answer: Sorting is not possible in Deletion. Using insertion we can perform insertion sort, using selection
we can perform selection sort, using exchange we can perform the bubble sort (and other similar sorting
methods). But no sorting method can be done just using deletion.

Question 11: What are the methods available in storing sequential files?

Answer: Straight merging, Natural merging, Polyphase sort, and Distribution of Initial runs.

Question 12: List out few of the Application of tree data-structure?

Answer: The manipulation of Arithmetic expression, Symbol Table construction, Syntax analysis.

Question 13: List out few of the applications that make use of Multilinked Structures?

Answer: Sparse matrix, Index generation.

Question 14: In tree construction which is the suitable efficient data structure? (Array, Linked list,

Stack, Queue)

Answer: Linked list is the suitable efficient data structure.

Question 15: What is the type of the algorithm used in solving the 8 Queens problem?

Answer: Backtracking.

Question 16: In an AVL tree, at what condition the balancing is to be done?

Answer: If the 'pivotal value' (or the 'Height factor') is greater than 1 or less than -1.

Question 17: What is the bucket size, when the overlapping and collision occur at same time?

Answer: One. If there is only one entry possible in the bucket, when the collision occurs, there is no way to
accommodate the colliding value. This results in the overlapping of values.

Question 18: Classify the Hashing Functions based on the various methods by which the key value is
found.

Answer: Direct method, Subtraction method, Modulo-Division method, Digit-Extraction method, Mid-
Square method, Folding method, and Pseudo-random method.

Question 19: What are the types of Collision Resolution Techniques and the methods used in each of
the type?

Answer:

Open addressing (closed hashing), The methods used include: Overflow block.

Closed addressing (open hashing), The methods used include: Linked list, Binary tree.

Question 20: In RDBMS, what is the efficient data structure used in the internal storage
representation?

Answer:

B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This
corresponds to the records that shall be stored in leaf nodes.
Question 21: What is a spanning Tree?

Answer: A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree
once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is
minimized.

Question 22: Does the minimum spanning tree of a graph give the shortest distance between any 2 specified
nodes?

Answer: No. The Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But
it doesn't mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.

Question 23: Which is the simplest file structure? (Sequential, Indexed, Random)

Answer: Sequential is the simplest file structure.

Question 24: Whether Linked List is linear or Non-linear data structure?

Answer: According to Access strategies Linked list is a linear one. According to Storage Linked List is a
Non-linear one.

Question 25: What are the various operations that can be performed on different Data Structures?

Answer: Following operations can be performed on the data structures:

1. Traversing

2. Searching

3. Inserting

4. Deleting

5. Sorting

6. Merging

1. Traversing- It is used to access each data item exactly once so that it can be

processed.

2. Searching- It is used to find out the location of the data item if it exists in the given

collection of data items.

3. Inserting- It is used to add a new data item in the given collection of data items.

4. Deleting- It is used to delete an existing data item from the given collection of data

items.

5. Sorting- It is used to arrange the data items in some order i.e. in ascending or

descending order in case of numerical data and in dictionary order in case of

alphanumeric data.

6. Merging- It is used to combine the data items of two sorted files into single file in
the sorted form.

Question 26: How is an Array different from Linked List?

Answer: 1) The size of the arrays is fixed: So we must know the upper limit on the number of

elements in advance. Also, generally, the allocated memory is equal to the upper limit

irrespective of the usage, and in practical uses, upper limit is rarely reached.

(2) Inserting a new element in an array of elements is expensive, because room has to be

created for the new elements and to create room existing elements have to shifted.

Deletion is also expensive with arrays until unless some special techniques are used. For

example, to delete 1010 in id[], everything after 1010 has to be moved.

So Linked list provides following two advantages over arrays

1) Dynamic size

2) Ease of insertion/deletion

Question 27: What is Stack and where it can be used?

Answer: A stack is defined by having a LIFO (Last In First Out) ordering principle. The first element added
to a stack is the last to be removed. Equivalently, the last element added to a stack is the first to be removed.
Operations that act on a stack have a unique terminology:

• Push - add a new element to the stack.

• Pop - remove an element from the stack.

Uses of Stack - undo\redo operation in word processors, Expression evaluation and syntax

parsing, many virtual machines like JVM are stack oriented.

Question 28: What is a Queue, how it is different from stack and how is it implemented?

Answer: Stack and Queue both are the non-primitive data structures. The main differences between stack
and queue are that stack uses LIFO (last in first out) method to access and add data elements whereas Queue
uses FIFO (First in first out) method to access and add data elements.

Stack has only one end open for pushing and popping the data elements on the other hand Queue has both
ends open for enqueuing and dequeuing the data elements. Stack and queue are the data structures used for
storing data elements and are actually based on some real world equivalent. For example, the stack is a stack
of CD’s where you can take out and put in CD through the top of the stack of CDs. Similarly, The queue is a
queue for Theatre tickets where the person standing in the first place, i.e., front of the queue will be served
first and the new person arriving will appear in the back of the queue (rear end of the queue).

Question 29: What are Infix, prefix, Postfix notations?

Answer: Infix notation: X + Y

Operators are written in-between their operands. This is the usual way we write expressions
Postfix notation (also known as "Reverse Polish notation"): X Y + Operators are written after their operands.

Prefix notation (also known as "Polish notation"): + X Y Operators are written before their operands.

Question 30: What is a Linked List and what are its types?

Answer: A Linked List is a linear data structure made up of multiple node elements that are linked together
using pointers. This allows the elements to be stored in different locations, allowing for a more optimal
storage of information. Linked Lists can be dynamic in size, and have more optimal insertion and deletion
than arrays. There are three common types of Linked List.

1. Singly Linked List

2. Doubly Linked List

3. Circular Linked List

Question 31: Which data structures are used for BFS and DFS of a graph?

Answer: DFS uses stack to search through the data structures, whereas BFS uses queue.

Question 32: Can doubly linked be implemented using a single pointer variable in every node?

Answer: Yes, a doubly linked list can be implemented using a single pointer variable in every node. This
type of list is called a XOR Linked List or Memory Efficient. This is because it is called bitwise XOR
operation to save space for one address. In the XOR linked list, instead of storing actual memory addresses,
every node stores the XOR of addresses of previous and next nodes.

Question 33: How to implement a stack using queue?

Answer: In push operation, the new element is always enqueued to q1. In pop() operation, if q2 is empty
then all the elements except the last, are moved to q2. Finally the last element is dequeued from q1 and
returned.

Question 34: How to implement a queue using stack?

Answer: Keep 2 stacks, let's call them inbox and outbox.

Enqueue:

• Push the new element onto inbox

Dequeue:

• If outbox is empty, refill it by popping each element from inbox and pushing it onto

outbox

• Pop and return the top element from outbox

Using this method, each element will be in each stack exactly once - meaning each element will be pushed
twice and popped twice, giving amortized constant time operations.

Question 35: Which Data Structure should be used for implementing LRU cache?

Answer: Queue which is implemented using a doubly linked list. The maximum size of the queue will be
equal to the total number of frames available (cache size).The most recently used pages will be near front
end and least recently pages will be near rear end. A Hash with page number as key and address of the
corresponding queue node as value.

Question 36: How to check if a given Binary Tree is BST or not?

Answer: A binary search tree (BST) is a node based binary tree data structure which has the following
properties.

• The left subtree of a node contains only nodes with keys less than the node’s key.

• The right subtree of a node contains only nodes with keys greater than the node’s key.

• Both the left and right subtrees must also be binary search trees.

Question 37: What's the major distinction in between Storage structure and file structure and how?

Answer: The representation of a particular data structure in the memory of a computer is called a storage
structure whereas a storage structure representation in auxiliary memory is often called a file structure.

Question 38: What are the applications of binary tree? [Infosys, TCS]

Answer: Binary Search Tree - Used in many search applications where data is constantly entering/leaving,
such as the map and set objects in many languages' libraries.

• Binary Space Partition - Used in almost every 3D video game to determine what objects need to be
rendered.

• Binary Tries - Used in almost every high-bandwidth router for storing router-tables.

• Hash Trees - used in p2p programs and specialized image-signatures in which a hash needs to be verified,
but the whole file is not available.

• Heaps - Used in implementing efficient priority-queues, which in turn are used for

scheduling processes in many operating systems, Quality-of-Service in routers, and A* (path-finding


algorithm used in AI applications, including robotics and video games). Also used in heap-sort.

• Huffman Coding Tree (Chip Uni) - used in compression algorithms, such as those used by the .jpeg and
.mp3 file-formats.

Question 39: What is divide and conquer method?

Answer: In computer science, divide and conquer is an algorithm design paradigm based on multi-branched
recursion. A divide and conquer algorithm works by recursively breaking down a problem into two or more
sub-problems of the same or related type, until these become simple enough to be solved directly.

Question 40: Define in -order traversal?

Answer: i)Process the left subtree

ii)Process the root node

iii)Process the right subtree


Subject: Object Oriented Programming Systems

Question 1: What is OOPS?

Answer: Object Oriented Programming System is the programming technique to write programs based on
the real world objects. The states and behaviors of an object are represented as the member variables and
methods. In OOPS programming programs are organized around objects and data rather than actions and
logic.

Question 2: What are the advantages of OOPS concepts?

Answer: Major advantages of OOPS programming are;

1. Simplicity: OOPS programming objects model real world objects, so the complexity is reduced and
the program structure is clear.
2. Modularity: Each object forms a separate entity whose internal workings are decoupled from other
parts of the system.
3. Modifiability: It is easy to make minor changes in the data representation or the procedures in an
OO program. Changes inside a class do not affect any other part of a program, since the only public
interface that the external world has to a class is through the use of methods.
4. Extensibility: Adding new features or responding to changing operating environments can be solved
by introducing a few new objects and modifying some existing ones.
5. Maintainability: Objects can be maintained separately, making locating and fixing problems easier.
6. Reusability: Objects can be reused in different programs.

Question 3: What is the difference between Procedural programming and OOPS? [Infosys, TCS]

Answer:

1. Procedural language is based on functions but object oriented language is based on real world
objects.
2. Procedural language gives importance on the sequence of function execution but object oriented
language gives importance on states and behaviors of the objects.
3. Procedural language exposes the data to the entire program but object oriented language
encapsulates the data.
4. Procedural language follows top down programming paradigm but object oriented language follows
bottom up programming paradigm.
5. Procedural language is complex in nature so it is difficult to modify, extend and maintain but object
oriented language is less complex in nature so it is easier to modify, extend and maintain.
6. Procedural language provides less scope of code reuse but object oriented language provides more
scope of code reuse.

Question 4: What are the core concepts of OOPS?

Answer:

OOPS core concepts are;

1. Abstraction
2. Encapsulation
3. Polymorphism
4. Inheritance
5. Composition
6. Association
7. Aggregation
Question 5: What is Abstraction?

Answer: Abstraction is an OOPS concept to construct the structure of the real world objects. During this
construction only the general states and behaviors are taken and more specific states and behaviors are left
aside for the implementers.

Question 6: What is Encapsulation?

Answer: Encapsulation is an OOPS concept to create and define the permissions and restrictions of an object
and its member variables and methods. A very simple example to explain the concept is to make the member
variables of a class private and providing public getter and setter methods. Java provides four types of access
level modifiers: public, protected, no modifier and private.

Question 7: What is the difference between Abstraction and Encapsulation? [Infosys, TCS, Wipro]

Answer:

1. “Program to interfaces, not implementations” is the principle for Abstraction and “Encapsulate what
varies” is the OO principle for Encapsulation.
2. Abstraction provides a general structure of a class and leaves the details for the implementers.
Encapsulation is to create and define the permissions and restrictions of an object and its member
variables and methods.
3. Abstraction is implemented in Java using interface and abstract class while Encapsulation is
implemented using four types of access level modifiers: public, protected, no modifier and private.

Question 8: What is Polymorphism?

Answer:

Polymorphism is the occurrence of something in various forms. Java supports various forms of
polymorphism like polymorphic reference variables, polymorphic method, polymorphic return types and
polymorphic argument types.

Question 9: What is Inheritance?

Answer:

A subclass can inherit the states and behaviors of it’s super class is known as inheritance.

Question 10: What is multiple inheritance?

Answer:

A child class inheriting states and behaviors from multiple parent classes is known as multiple inheritance.

Question 11: What is the diamond problem in inheritance?

Answer: In case of multiple inheritance, suppose class A has two subclasses B and C, and a class D has two
super classes B and C.If a method present in A is overridden by both B and C but not by D then from which
class D will inherit that method B or C? This problem is known as diamond problem.

Question 12: Why Java does not support multiple inheritance? [Infosys, TCS, Mphasis]
Answer: Java was designed to be a simple language and multiple inheritance introduces complexities like
diamond problem. Inheriting states or behaviors from two different type of classes is a case which in reality
very rare and it can be achieved easily through an object association.

Question 13: What is Static Binding and Dynamic Binding?

Answer: Static or early binding is resolved at compile time. Method overloading is an example of static
binding.

Dynamic or late or virtual binding is resolved at run time. Method overriding is an example of dynamic
binding.

Question 14: What is the meaning of “IS-A” and “HAS-A” relationship?

Answer: “IS-A” relationship implies inheritance. A sub class object is said to have “IS-A” relationship with
the super class or interface. If class A extends B then A “IS-A” B. It is transitive, that is, if class A extends B
and class B extends C then A “IS-A” C. The “instanceof” operator in java determines the “IS-A”
relationship.

When a class A has a member reference variable of type B then A “HAS-A” B. It is also known as
Aggregation.

Question 15: What is Association?

Answer: Association is a relationship between two objects with multiplicity.

Question 16: What is Aggregation?

Answer: Aggregation is also known as “HAS-A” relationship. When class Car has a member reference
variable of type Wheel then the relationship between the classes Car and Wheel is known as Aggregation.
Aggregation can be understood as “whole to its parts” relationship.

Car is the whole and Wheel is part. Wheel can exist without the Car. Aggregation is a weak association.

Question 17: What is Composition?

Answer: Composition is a special form of Aggregation where the part cannot exist without the whole.
Composition is a strong Association. Composition relationship is represented like aggregation with one
difference that the diamond shape is filled.

Question 18: What is Dependency?

Answer: When one class depends on another because it uses that at some point in time then this relationship
is known as Dependency. One class depends on another if the independent class is a parameter variable or
local variable of a method of the dependent class. A Dependency is drawn as a dotted line from the
dependent class to the independent class with an open arrowhead pointing to the independent class.

Question 19: What is the difference between Association and Dependency?

Answer: The main difference between Association and Dependency is in case of Association one class has
an attribute or member variable of the other class type but in case of Dependency a method takes an
argument of the other class type or a method has a local variable of the other class type.

Question 20: What is a Class? [Infosys, TCS, Mphasis]


Answer: A class is simply a representation of a type of object. It is the blueprint/ plan/ template that describe
the details of an object.

Question 21: What is an Object? [Infosys, TCS, Mphasis]

Answer: An object is an instance of a class. It has its own state, behavior, and identity.

Java

Question 1: Differentiate between Structure and Class ? [Infosys, TCS, Mphasis]

Answer:

Structure Class
A struct is a value type. A class is a reference type.

Structures are stored as a stack on memory. class are stored as heap on memory.

Members of struct are public by default Members of a class are private by default

A structure can contain only data members A class can contain data members and member
functions.

Sizeof operator can be used with structure Sizeof operator can’t be used with class

Structure type variable can be created without using Class type variable (object) cannot be created
the new keyword. without using the new keyword

The member variable cannot be initialized directly The member variable can be initialized directly

Question 2: What is Polymorphism? Explain it with example ?

Answer: Polymorphism is derived from 2 greek words: poly and morphs. The word "poly" means many
and "morphs" means forms. So polymorphism means many forms.

Example: Suppose if you are in class room that time you behave like a student, when you are in market at
that time you behave like a customer, when you at your home at that time you behave like a son or daughter,
Here one person present in different-different behaviors.

Question 3: What is Inheritance?

Answer: Inheritance is a concept where one class shares the structure and behavior defined in another class.
If inheritance applied on one class is called Single Inheritance, and if it depends on multiple classes, then it is
called multiple Inheritance.

Question 4: What are manipulators?


Answer: Manipulators are the functions which can be used in conjunction with the insertion (<<) and
extraction (>>) operators on an object. Examples are endl and setw.

Question 5: Define a constructor?

Answer: A constructor is a method used to initialize the state of an object, and it gets invoked at the time of
object creation. Rules for constructor are:

• Constructor Name should be same as class name.


• A constructor must have no return type.

Question 6: Define Destructor?

Answer: A destructor is a method which is automatically called when the object is made of scope or
destroyed. Destructor name is also same as class name but with the tilde symbol before the name.

Question 7: What is an Inline function?

Answer: An inline function is a technique used by the compilers and instructs to insert complete body of the
function wherever that function is used in the program source code.

Question 8: What is a virtual function?

Answer: A virtual function is a member function of a class, and its functionality can be overridden in its
derived class. This function can be implemented by using a keyword called virtual, and it can be given
during function declaration.

Question 9: What is a friend function?

Answer: A friend function is a friend of a class that is allowed to access to Public, private or protected data
in that same class. If the function is defined outside the class cannot access such information.

Question 10: What is function overloading?

Answer: Function overloading an as a normal function, but it can perform different tasks. It allows the
creation of several methods with the same name which differ from each other by the type of input and output
of the function.

Example:
void add(int& a, int& b);
void add(double& a, double& b);

Question 11: What is operator overloading? [Infosys, TCS, Mphasis]

Answer: Operator overloading is a function where different operators are applied and depends on the
arguments. Operator,-,* can be used to pass through the function, and it has their own precedence to execute

Question 12: What is an abstract class?

Answer: An abstract class is a class which cannot be instantiated. Creation of an object is not possible with
an abstract class, but it can be inherited. An abstract class can contain only Abstract method. Java allows only
abstract method in abstract class while for other languages allow non-abstract method as well.

Question 13: What is the use of finalize method?

Answer: Finalize method helps to perform cleanup operations on the resources which are not currently
used. Finalize method is protected, and it is accessible only through this class or by a derived class.
Question 14: What is the super keyword?

Answer: Super keyword is used to invoke the overridden method which overrides one of its superclass
methods. This keyword allows to access overridden methods and also to access hidden members of the
superclass.

Question 15: Differentiate between Call by value & Call by reference ?

Answer:

Call by Value – Value passed will get modified only inside the function, and it returns the same value
whatever it is passed it into the function.

Call by Reference – Value passed will get modified in both inside and outside the functions and it returns the
same or different value.

Question 16: What is method overriding? [Infosys, TCS, Mphasis]

Answer: Method overriding is a feature that allows a subclass to provide the implementation of a method
that overrides in the main class. This will overrides the implementation in the superclass by providing the
same method name, same parameter and same return type.

Question 17: What is an interface? [Infosys, TCS, Mphasis]

Answer: An interface is a collection of an abstract method. If the class implements an inheritance, and then
thereby inherits all the abstract methods of an interface.

Question 18: What is exception handling? [Infosys, TCS, Mphasis]

Answer: An exception is an event that occurs during the execution of a program. Exceptions can be of any
type – Runtime exception, Error exceptions. Those exceptions are adequately handled through exception
handling mechanism like try, catch and throw keywords.

Question 19: Differentiate between Overloading and Overriding ? [Infosys, TCS, Mphasis]

Answer: Overloading is static binding whereas Overriding is dynamic binding. Overloading is nothing but
the same method with different arguments, and it may or may not return the same value in the same class
itself.

Overriding is the same method names with same arguments and return types associated with the class and its
child class.

Question 20: Differentiate between class and an object?

Answer: An object is an instance of a class. Objects hold multiple information, but classes don’t have any
information. Definition of properties and functions can be done in class and can be used by the object.

A class can have sub-classes, and an object doesn’t have sub-objects.

Question 21: What are access modifiers in Java? [Infosys, TCS, Mphasis]

Answer: Access modifiers determine the scope of the method or variables that can be accessed from other
various objects or classes.

• Private.
• Protected.
• Public.
• Default
Question 22: How can we call the base method without creating an instance?

Answer: Yes, it is possible to call the base method without creating an instance. And that method should be
“Static method”.

Doing inheritance from that class.-Use Base Keyword from a derived class.

Question 23: What is early and late binding?

Answer: Early binding refers to the assignment of values to variables during design time whereas late
binding refers to the assignment of values to variables during run time.

Question 24: What is ‘this’ pointer? [Infosys, TCS, Mphasis]

Answer: “this” pointer refers to the current object of a class. THIS keyword is used as a pointer which
differentiates between the current object with the global object. Basically, it refers to the current object.

Question 25: What is a copy constructor?

Answer: This is a special constructor for creating a new object as a copy of an existing object. There will
always be only one copy constructor that can be either defined by the user or the system.

Question 26: What is a base class, sub class, and super class?
Answer: The base class is the most generalized class, and it is said to be a root class.

A Sub class is a class that inherits from one or more base classes.

The superclass is the parent class from which another class inherits.

Question 27: What is Multithreading? Explain it with example?

Answer: he ability to make different objects act on a platform is enabled with the concept of
Multithreading.Multithreading in Java gives the ability to execute code by different threads to perform
tasks in parallel or as a separate task without waiting for other to complete.

Question 28: What is JDBC ? [LG Soft]

Answer: Java Database Connectivity (JDBC) is an application programming interface (API) for the
programming language Java, which defines how a client may access a database. It is a Java-based data
access technology used for Java database connectivity.
Question 29: Explain the meaning of public static void main() in Java ? [Infosys, TCS, Mphasis]

Answer:

public: It is an Access Modifier, which defines who can access this Method. public means that this method
will be accessible by any Class(If other Classes can access this Class.)

static: It is a keyword which identifies the class related thing. It means the given Method or variable is not
instance related but Class related. It can be accessed without creating the instance of a Class.
void: Is used to define the Return Type of the Method. It defines what the method can return. Void means the
Method will not return any value.
main() :It is the name of the Method. This Method name is searched by JVM as a starting point for an
application with a particular signature only.
String args[]: It is the parameter to the main Method. Argument name could be anything.
Subject: Operating Systems

Question 1: What are the functionalities of an operating system? [Infosys]

Answer: These are some major functionalities of an operating system:

• The operating system shares the Computer's memory and sharing of the central processing unit time
by various applications and peripheral devices.
• An operating system provides a user interface, i.e., graphical user interface and command line.
• An operating system includes functionality for booting the computer.
• Perform some basic tasks, i.e., managing the peripheral devices.
• It provides file management which refers to the way that operating system stores, retrieves,
manipulates, and saves data.

Question 2: What is a process and what is a thread? [ TCS, Wipro]

Answer: A thread is a lightweight sub-process, the smallest unit of processing. It is a separate path of
execution. Threads are independent that means if there is an exception in one thread, it doesn't affect other
threads. It uses a shared memory area.

The process is heavyweight and can consists of multiple threads. It is a small part of a program.

Question 3: What are the advantages of a thread? How does the multithreading look like?

Answer:

• These are the following advantages of a Thread:


• It provides efficient communication.
• It minimizes the context switching time.
• By using thread, we can get the concurrency within a process.
• Thread allows utilization of multiprocessor architectures to a greater scale and efficiency.
• A process which executes multiple threads simultaneously is known as multithreading.
• A thread is a lightweight sub-process, the smallest unit of processing.
• To achieve multitasking in java, we have two ways:
1. Multiprocessing and multithreading
2. One process may contain more than one thread and execute simultaneously is known as
multithreading.

Question 4: What are Multi-Processing and Multitasking?

Answer:

Multitasking: As the name indicates multiple tasks run on a single CPU. We use multitasking to utilize the
CPU.

Multitasking can be achieved in two ways:

• Process-based Multitasking (Multiprocessing)

• Thread-based Multitasking (Multithreading)


Multi-processing: Multi-processing refers to the ability of a system to support more than one central
processing unit at the same time.

Multithreading: As the name indicates multiple threads run concurrently. A thread is a lightweight sub-
process, the smallest unit of processing.

Question 5: When is a thread created and started, what is its initial state?

Answer: A thread is created and started with its Initial state called "ready" state where a thread is ready to

run.

Question 6: What is a priority of task and how is it used in scheduling?

Answer: The entire task can't execute simultaneously so that a scheduler assign priorities to all tasks for its
execution. Priorities can be high or low depending on the task's importance, and the integer values determine
it. Higher priority gets CPU for execution first.

Computer Networking, Software Engineering using Project, Programming Skill

Question 1: Differentiate between OSI and TCP/IP Model ?

Answer:

Question 2: What do you mean by Protocol?


Answer: A protocol is a set of rules and guidelines for communicating data. Rules are defined for each step
and process during communication between two or more computers. Networks have to follow these rules to
successfully transmit data.

Question 3: Differentiate between TCP and UDP ?

Answer:

Question 4: What do you mean by IP ?

Answer: An Internet Protocol address (IP address) is a numerical label assigned to each device connected to
a computer network that uses the Internet Protocol for communication. An IP address serves two principal
functions: host or network interface identification and location addressing.

Question 5: Differentiate between IPV4 and IPV6.

Answer:
Qu
esti
on
6:

Wh
at
are
diff
ere
nt
clas
ses
of
IP?

An
swe
r:

Question 7: What is a Port?

Answer: A port number is a way to identify a specific process to which an Internet or other network message
is to be forwarded when it arrives at a server. Port operates with Transport layer of OSI. For the
Transmission Control Protocol and the User Datagram Protocol, a port number is a 16-bit integer that is put
in the header appended to a message unit. This port number is passed logically between client and server
transport layers and physically between the transport layer and the Internet Protocol layer and forwarded on.

Question 8: What do you mean by Socket?

Answer: A socket is one endpoint of a two-way communication link between two programs running on the
network. A socket is bound to a port number so that the TCP layer can identify the application that data is
destined to be sent to. An endpoint is a combination of an IP address and a port number.

Question 9: Differentiate between Socket and Port?


Answer: A socket is an end point of a bidirectional communication that occurs in a computer network that is
based on the Internet protocol, whereas a port is a logical data connection that can be used to exchange data
without the use of a temporary file or storage. A socket is associated with a port and there can be multiple
sockets associated with a port. There can be a single passive socket associated with a port that is waiting for
incoming connections. Furthermore, there can be multiple active sockets that correspond to connections that
are open in that port.

Question 10: What do you mean by FTP?

Answer: FTP is an acronym for File Transfer Protocol. As the name suggests, FTP is used to transfer files
between computers on a network. You can use FTP to exchange files between computer accounts, transfer
files between an account and a desktop computer, or access online software archives.

Question 11: What do you mean by Telnet?

Answer: Telnet is a protocol that allows you to connect to remote computers (called hosts) over a TCP/IP
network (such as the internet). Using telnet client software on your computer, you can make a connection to
a telnet server (i.e., the remote host).

Question 12: Ellaborate different security algorithms?

Answer: The popular security algorithms are:

1. Hash Message Authentication Code (HMAC): It is a secret-key algorithm. It provides data integrity and
origin authentication through a digital signature that a keyed hash function produces.

2. Message Digest version (MD5): The MD5 algorithm is a hash function that can produce a 128-bit value.

3. Secure Hash Algorithm (SHA) for authentication: SHA is a hash function that can produce a 160-bit value

4. Data Encryption Standard (DES): It is an encryption algorithm that the US government defines and
endorses as an official standard. DES breaks a message into 64-bit cipher blocks and uses a 40-bit or 56-bit
key to encrypt each block.

5. DES-Cipher Block Chaining (CBC), and Triple DES (3DES) for encryption: When DES works under the
CBC mode (i.e., DES-CBC), DES applies an exclusive OR operation to each 64-bit plain-text block with the
previous cipher block before encrypting the block with the DES key. DES-CBC is more secure than DES. In
3DES, DES encrypts each cipher block three times, making 3DES far more secure than DES. The more
secure the algorithm IPSec uses, the more processing time the algorithm requires.

Question 13: What do you men by Digital Signature?

Answer: Digital Signature is a process that guarantees that the contents of a message have not been altered
in transit. When you, the server, digitally sign a document, you add a one-way hash (encryption) of the
message content using your public and private key pair.Your client can still read it, but the process creates a
"signature" that only the server's public key can decrypt. The client, using the server's public key, can then
validate the sender as well as the integrity of message contents.

Question 14: Differentiate between LAN, MAN and WAN ?

Answer:
Introduction of IT companies, Personalities and Latest technologies

Question 1: Brief Introduction of Infosys:

Answer:

Founded on: 7th July 1981


Founders are :

N. R. Narayana Murthy Nandan Nilekani S. Gopalakrishnan

S. D. Shibulal K. Dinesh N. S. Raghavan

Ashok Arora

Head Office: Bengaluru Karnataka, India

Achievements: Infosys is the second-largest Indian IT company by 2017 revenues and 596th largest public
company in the world in terms of revenue. (Apple Inc. was the largest IT company in 2017)

Key persons: Nandan Nilekani (Chairman) Salil S. Parekh (CEO & MD)

Number of Employees: 200,364 (2017)

Question 2: Brief Introduction of Some famous IT related personalities

Answer:

1. Satya Nadela: An Indian American Business Executive (Chief Executive Officer of Microsoft)

2. Bill Gates: William Henry Gates III (born October 28, 1955) is an American business magnate,
principal foundar of Microsoft Corporation

3. Mark Zuckerberg: An American technology entrepreneur and CEO of Facebook

4. Steve Jobs: American businessman, co-founder, chairman, and CEO of Apple Inc.

5. Sundar Pichai: An Indian American business executive, CEO of Google Inc.

6. Azim Premji: An Indian business tycoon, investor, chairman of Wipro Limited

7. Cyrus Mistry: An Irish businessman of Indian origin who was the chairman of Tata Group,

8. Nandan Nilekani: An Indian entrepreneur, bureaucrat and politician. He co-founded Infosys and is the
non executive chairman of Infosys

9. N. R. Narayan Murthy: An Indian IT industrialist and the co-founder of Infosys

10. Vijay Shekhar Sharma: An Indian entrepreneur, founder of the company Paytm

Question 3: Brief introduction of some popular IT related technologies

Answer:

1. Machine Learning: Machine learning is an application of artificial intelligence (AI) that provides systems
the ability to automatically learn and improve from experience without being explicitly programmed.
Machine learning focuses on the development of computer programs that can access data and use it learn for
themselves.

Common Applications of Machine Learning:

1) Anomaly detection is the process of sifting through mountains of data and learning to identify
instances that deviate from recognized patterns. This technology enables credit card companies to
instantly identify potentially fraudulent transactions. It’s also used by email programs like Gmail
and Outlook to identify and filter out spam.

2) Natural language processing (NLP) enables computers to make sense of human language, whether
written or spoken. Turning unstructured language into structured data allows aggregators like Google
News to automatically sort news articles by subject. Consumer analytics companies use it to gauge
customer satisfaction, and legal tech companies are able to create searchable, organized databases of
legal opinions. When applied to human speech, NLP enables virtual assistants like Siri or Microsoft
Cortana to understand and respond to spoken requests.

3) Recommendation engines gather and analyze data about users’ behaviors and preferences to make
predictions about what users might like based on their similarity to other users. Services as diverse as
Amazon, Netflix, Spotify, and Tinder rely on recommendation engines to suggest new products,
movies, music, and dates to their users.

4) Named entity recognition is the ability to identify specific entities (like names, titles, actions,
addresses, etc.) in documents. This technology allows Apple’s Messages app to automatically
identify phone numbers and dates so that you can call a friend or save a date to your calendar with
just a tap.

5) Image recognition allows computers to extract meaning from still images and videos. This
technology enables the U.S. Postal Service to decipher handwritten addresses and Facebook and
other photo apps to detect and identify human faces. The startup Enlitic uses this technology to
analyze medical images like X-rays, CT scans, and MRIs to spot trends and anomalies.

2. Deep Learning (DL): Deep Learning, as a branch of Machine Learning, employs algorithms to process
data and imitate the thinking process, or to develop abstractions. Deep Learning (DL) uses layers of
algorithms to process data, understand human speech, and visually recognize objects. Information is passed
through each layer, with the output of the previous layer providing input for the next layer.

Common Applications of Deep Learning: Colorization of Black and White Images, Adding Sounds To
Silent Movies, Automatic Machine Translation, Object Classification in Photographs,
Automatic Handwriting Generation, Character Text Generation, Image Caption Generation, Automatic Game
Playing

3. Bitcoin: It is a peer-to-peer payment system and digital currency introduced as open source software in
2009 by pseudonymous developer Satoshi Nakamoto. It is a cryptocurrency, so-called because it uses
cryptography to control the creation and transfer of money. Users send payments by broadcasting digitally
signed messages to the network. Participants known as miners verify and timestamp transactions into a
shared public database called the block chain, for which they are rewarded with transaction fees and newly
minted bitcoins. Conventionally "Bitcoin" capitalized refers to the technology and network whereas
"bitcoins" lowercase refers to the currency itself. Bitcoins can be obtained by mining or in exchange for
products, services, or other currencies.

4. Blockchain: It is a distributed database system. This means, instead of storing files on a single computer,
information is stored across millions of computers all over the globe.

Consider this example: When we login to Facebook, all the content that we and our friends share on
Facebook are stored in Facebook’s central server. Facebook technically owns all of that data (even though
they claim that they don’t own our data); they use that data to target ads. Blockchain technology disrupts this
and gives end users the power to control their personally identifiable information.

Blockchain as the name suggests is a chain of blocks that are linked together one after the other. All nodes on
the network have the full replication of all transactions that have taken place on the blockchain ever since the
genesis block is mined. The ledger is open and the transaction between accounts will be displayed on the
ledger for the whole world to see. The transactions are cryptographically encrypted and the digital signature
of one block is used to encrypt the next block. This is a perpetual system and to modify one transaction in the
ledger is impossible. If an attack is tried, cryptographically encrypting all future blocks is computationally
and economically a very expensive task.

5. Industrial IOT: IIoT is the advanced form of IoT and it is used in industrial applications such as agriculture
and manufacturing. It can be used as a tool for predictive maintenance. In simplest of words, IIoT can tell an
Oil and Gas company how to minimise impending damage and disruption before a leakage occurs in a gas
pipeline, whereas in IoT, home users are informed when to feed their pets on time.

With the help of highly calibrated sensors, big data analytics, cheaper connectivity and the development in
machine learning, industries have started to implement predictive maintenance, much much of it supported
by IIoT. This allows the optimum time for maintenance procedures to be predicted then scheduled, so
lowering the cost of maintenance, which in turn helps the industry to become more efficient and deliver
faster.

6. Augmented Reality (AR): It is a general term for a collection of technologies used to blend computer
generated information with the viewer’s natural senses.

A simple example of AR is using a spatial display (digital projector) to augment a real world object (a wall)
for a presentation. As you can see, it’s not a new idea, but a real revolution has come with advances in
mobile personal computing such as tablets and smartphones.
Since mobile ‘smart’ devices have become ubiquitous, ‘Augmented Reality Browsers’ have been developed
to run on them. AR browsers utilise the device’s sensors (camera input, GPS, compass, et al) and
superimpose useful information in a layer on top of the image from the camera which, in turn, is viewed on
the device’s screen.

AR Browsers can retrieve and display graphics, 3D objects, text, audio, video, etc., and use geospatial or
visual ‘triggers’ (typically images, QR codes, point cloud data) in the environment to initiate the display.

7. Virtual Reality (VR): It is a technology which allows a user to interact with a computer -simulated
environment, whether that environment is a simulation of the real world or an imaginary world. It is the key
to experiencing, feeling and touching the past, present and the future. It is the medium of creating our own
world, our own customized reality. It could range from creating a video game to having a virtual stroll
around the universe, from walking through our own dream house to experiencing a walk on an alien planet.
W ith virtual reality,

We can experience the most intimidating and gruelling situations by playing safe and with a learning
perspective.

8. Hadoop: It is an Apache open source framework written in java that allows distributed processing of large
datasets across clusters of computers using simple programming models. A Hadoop frame-worked
application works in an environment that provides distributed storage and computation across clusters of
computers. Hadoop is designed to scale up from single server to thousands of machines, each offering local
computation and storage.

9. MapReduce: Hadoop MapReduce is a software framework for easily writing applications which process
big amounts of data in-parallel on large clusters (thousands of nodes) of commodity hardware in a reliable,
fault-tolerant manner.

The term MapReduce actually refers to the following two different tasks that Hadoop programs perform:
• The Map Task: This is the first task, which takes input data and converts it into a set of data, where
individual elements are broken down into tuples (key/value pairs).

• The Reduce Task: This task takes the output from a map task as input and combines those data
tuples into a smaller set of tuples. The reduce task is always performed after the map task.

10. NOSQL: It is a non-relational database management systems, different from traditional relational
database management systems in some significant ways. It is designed for distributed data stores where very
large scale of data storing needs (for example Google or Facebook which collects terabits of data every day
for their users). These type of data storing may not require fixed schema, avoid join operations and typically
scale horizontally.

In today’s time data is becoming easier to access and capture through third parties such as Facebook,
Google+ and others. Personal user information, social graphs, geo location data, user-generated content and
machine logging data are just a few examples where the data has been increasing exponentially. To avail the
above service properly, it is required to process huge amount of data. Which SQL databases were never
designed. The evolution of NoSql databases is to handle these huge data properly.

11. MongoDB: It is a NoSQL database which stores the data in form of key-value pairs. It is an Open
Source, Document Database which provides high performance and scalability along with data modelling
and data management of huge sets of data in an enterprise application.

MongoDB also provides the feature of Auto-Scaling. Since, MongoDB is a cross platform database and can
be installed across different platforms like Windows, Linux etc.

Like other NoSQL databases, MongoDB supports dynamic schema design, allowing the documents in a
collection to have different fields and structures. The database uses a document storage and data interchange
format called BSON, which provides a binary representation of JSON-like documents.

MongoDB was created by Dwight Merriman and Eliot Horowitz, who had encountered development and
scalability issues with traditional relational database approaches while building Web applications at
DoubleClick, an Internet advertising company that is now owned by Google Inc. According to Merriman, the
name of the database was derived from the word humongous to represent the idea of supporting large
amounts of data. Merriman and Horowitz helped form 10Gen Inc. in 2007 to commercialize MongoDB and
related software. The company was renamed MongoDB Inc. in 2013.

12. JSON: short for JavaScript Object Notation — is a format for sharing data. As its name suggests,
JSON is derived from the JavaScript programming language, but it’s available for use by many languages
including Python, Ruby, PHP, and Java. JSON is usually pronounced like the name “Jason.”

JSON uses the .json extension when it stands alone. When it’s defined in another file format (as in .html), it
can appear inside of quotes as a JSON string, or it can be an object assigned to a variable. This format is easy
to transmit between web server and client or browser.

Very readable and lightweight, JSON offers a good alternative to XML and requires much less formatting.
This informational guide will get you up to speed with the data you can use in JSON files, and the general
structure and syntax of this format.

13. Mahout: It is such a data mining framework that normally runs coupled with the Hadoop infrastructure
at its background to manage huge volumes of data. A mahout is one who drives an elephant as its master. The
name comes from its close association with Apache Hadoop which uses an elephant as its logo.

Hadoop is an open-source framework from Apache that allows to store and process big data in a distributed
environment across clusters of computers using simple programming models.

Apache Mahout is an open source project that is primarily used for creating scalable machine learning
algorithms. It implements popular machine learning techniques such as: Recommendation, Classification,
Clustering

14. Big Data: The term Big Data refers to all the data that is being generated across the globe at an
unprecedented rate. This data could be either structured or unstructured. Today’s business enterprises owe a
huge part of their success to an economy that is firmly knowledge-oriented. Data drives the modern
organizations of the world and hence making sense of this data and unravelling the various patterns and
revealing unseen connections within the vast sea of data becomes critical and a hugely rewarding endeavour
indeed. There is a need to convert Big Data into Business Intelligence that enterprises can readily deploy.
Better data leads to better decision making and an improved way to strategize for organizations regardless of
their size, geography, market share, customer segmentation and such other categorizations. Hadoop is the
platform of choice for working with extremely large volumes of data. The most successful enterprises of
tomorrow will be the ones that can make sense of all that data at extremely high volumes and speeds in order
to capture newer markets and customer base.

Big Data has certain characteristics and hence is defined using 4Vs namely:

Volume: the amount of


data that businesses can
collect is really enormous and hence the volume of the data becomes a critical factor in Big Data analytics.
Velocity: the rate at which new data is being generated all thanks to our dependence on the internet, sensors,
machine-to-machine data is also important to parse Big Data in a timely manner.

Variety:the data that is generated is completely heterogeneous in the sense that it could be in various formats
like video, text, database, numeric, sensor dataand so on and hence understanding the type of Big Data is a
key factor to unlocking its value.

Veracity: knowing whether the data that is available is coming from a credible source is of utmost
importance before deciphering and implementing Big Data for business needs.

15. Spark: Apache Spark is a lightning-fast cluster computing technology, designed for fast computation. It
is based on Hadoop MapReduce and it extends the MapReduce model to efficiently use it for more types of
computations, which includes interactive queries and stream processing. The main feature of Spark is its in-
memory cluster computing that increases the processing speed of an application.

Spark is designed to cover a wide range of workloads such as batch applications, iterative algorithms,
interactive queries and streaming. Apart from supporting all these workload in a respective system, it reduces
the management burden of maintaining separate tools.

Spark Components:

Apache Spark Core


Spark Core is the underlying general execution engine for spark platform that all other functionality is built
upon. It provides In-Memory computing and referencing datasets in external storage systems.

Spark SQL
Spark SQL is a component on top of Spark Core that introduces a new data abstraction called SchemaRDD,
which provides support for structured and semi-structured data.

Spark Streaming
Spark Streaming leverages Spark Core's fast scheduling capability to perform streaming analytics. It ingests
data in mini-batches and performs RDD (Resilient Distributed Datasets) transformations on those mini-
batches of data.
MLlib (Machine Learning Library)
MLlib is a distributed machine learning framework above Spark because of the distributed memory-based
Spark architecture. It is, according to benchmarks, done by the MLlib developers against the Alternating
Least Squares (ALS) implementations. Spark MLlib is nine times as fast as the Hadoop disk-based version of
Apache Mahout (before Mahout gained a Spark interface).

GraphX
GraphX is a distributed graph-processing framework on top of Spark. It provides an API for expressing
graph computation that can model the user-defined graphs by using Pregel abstraction API. It also provides
an optimized runtime for this abstraction.

HR Questions

Preparation Tips for Interviews

Prepare a very good resume and have a review with someone if possible.
1. Have all the other docs\marksheet with you (as you have to enter the each and every semester marks
before your written test)
2. Dress up well, a good formal dress, with fully trimmed, nicely combed (as everyone expect that)
3. Be Confident, Clear and Loud in the HR round (Don’t confuse them\Don’t make them to ask you for
your answers once again)
4. Have a firm handshake with the HR
5. Greet the HR with the Smile
6. Say Thank you while leaving if the HR appreciates you at anytime
7. Have faith in God as everything is possible in this world

Questions Asked in Previous Interviews


• Some discussion about my hobbies. Which one is your favorite & why? What does it teach you?
• Why are you not pursuing dance or basketball as your career? (I mentioned dance & basketball as
my hobbies).
• Tell me one real time situation where you have emerged as a Leader?
• Why have you applied at Infosys?
• Tell us about the company and its positioning as compared to its competitors?
• What makes you stand out against all the other candidates?
• Describe yourself.
• Where would you like to work: software developing or software testing?
• Why do you want to work at our company?
• Why should we prefer you to other candidates?
• What technical/functional areas interest you most? What would you be passionate about working on?
Why?
• Where do you see yourself in the next five years?
• What is your biggest achievement till now?
• Tell us about your ultimate goal in life.
• Discuss the most stressful situation you’ve faced in college life.
• What personal attributes do you have that will help you succeed in the work place?
• Why do you think you are fit for our organization?
• You had to wait for more than 5 hours for the interview. Are you feeling tired?
• Tell me how was your online test?
• What is your father’s occupation? What is his job location?
• Who is your role model? What have you incorporated in your life from him/her?
• Do you live in a hostel or at home?
• Introduce yourself and tell us something apart from the Resume.
• Do you have an offer from any other organization?
• Why do you want to work for us? Where do you see yourself in 8-10 years from now?
• How would you describe your college life?
• What are your strengths and weaknesses? What are you doing to overcome your weaknesses?
• Mention a person who is your role model in life.
• Where do you rate yourself (out of 10) as an engineer?
• What is your project all about?
• Why should Infosys hire you? How will you contribute to the growth of the company?
• What do you know about Infosys?
• Are you comfortable with working in shifts?
• Which subject you like and why?
• My first question was tell me about yourself?
• Are you fine with working in night shifts?
• Why should we hire you?
• Why do you want to join Infosys?
• What is your greatest strength?
• What do you want to achieve in the next 5 years?
• What is your greatest weakness?
• What is your greatest achievement?
• What is the difference between hard work and smart work
• On a scale of 1 to 10 how would you rate yourself as a leader?
• What makes you angry?
• Are you open to take risks? or Do you like experimenting?
• What are your future goals?
• Tell me about your short term and long-term goals.
• What motivates you?
• What are your hobbies? or
• What are you passionate about?
• Are you preparing for MBA exams ?
• Tell me about yourself family background?
• Tell me your strengths which can also be your weakness?
• Why did you take this project?
• Why do you think should we take you for this job?
• Are you planning to go for further studies?
• Are you an Introvert or Extrovert?
• Tell me something about yourself that is not written in your resume.
• Do you know anyone who works with this company?
• Are you a team player?
• Which courses have you enjoyed the most? The least? Why?
• Did you prepare for the interview? What did you prepare? (Question will be asked from What you
prepared)?
• How do you expect a mechanical engineering graduate can learn and work in a software company?
• Why did you Select IT?
• What would u be if not an IT engineer?
• Are you ready to relocate?
• How do you feel about doing repetitive work?
• What will you do if you are offered a job with a salary higher than this?
• How do you feel about working weekends and night shifts?
• Are you reliable? or Can I trust you with responsibilities?
• What are the three things that are most important for you in a job?
• What was the toughest decision you ever had to make?
• If you won a Rs.10-crore lottery, would you still work?
• Give me an example of your creativity. What makes you happy?
• How do you work under pressure? Can you handle the pressure?
• Do you want to ask us something about the company?

You might also like