CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies
Data Structures Interview Questions & Answers - Learning Mode
COOLINTERVIEW.COM CONCEPTS AND ARCHITECTURE INTERVIEW QUESTIONS DATA STRUCTURES INTERVIEW QUESTIONS QUESTIONS & ANSWERS - LEARNING MODE

Data Structures Interview Questions & Answers - Learning Mode

A data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Any data structure is designed to organize data to suit a specific purpose so that it can be accessed and worked with in appropriate ways.

Try Data Structures Interview Questions & Answers - Exam Mode

1 2 3 4 5 Next

Sort By : Latest First | Oldest First | By Rating

Data Structures Interview Questions & Answers - Learning Mode
Try Data Structures Interview Questions & Answers - Exam Mode
Question: Value of the first linked list index is _______

A) One
B) Zero
C) -1
D) None of the above







Answer: B) Zero Source: CoolInterview.com
Question: What does the symbol * signifies



Answer: A) declaring pointer.

Actually it depends on context. In a statement like int *ptr; the '*' tells that you are declaring a pointer.

In a statement like int i = *ptr; it tells that you want to assign value pointed to by ptr to variable i.
Source: CoolInterview.com
Question: List out the areas in which data structures are applied extensively?

Answer: Compiler Design, Operating System, Database Management System, Statistical analysis package, Numerical Analysis, Graphics, Artificial Intelligence, Simulation Source: CoolInterview.com
Question: Define stack?

Answer: An important sub class of lists permits the insertion or deletion of an element to occur only at one end. A linear list belonging to this sub class is called a stack. Source: CoolInterview.com
Question: Which of the following abstract data types are NOT used by Integer Abstract Data type group?



Answer: Float Source: CoolInterview.com
Question: Constructor is a member method of a class that is called when an instance of the class is declared



Answer: For some prog languages like C# : False -- to be specific a constructor is called when an instance of a class is initialized. In C# declaration A obj; does not call the constructor. A statement like A obj = new A(); calls the constructor.

For C++: true: When you declare an instance like A obj; the object is constructed using the constructor.
Source: CoolInterview.com
Question: What is a queue ?



Answer: A queue is a first in first out type of data structure.

An element is inserted at the last position and an element is always taken out from the first position.
Source: CoolInterview.com
Question: What is a one way chain or singly linked linear list?

Answer: A list has been defined to consist of an ordered set of elements which may vary in number. A simple way to represent a linear list is to expand each node to contain a link or pointer to the next time. Source: CoolInterview.com
Question: Linked list C++ application is organized into three files.They are _____, ______ and _____



Answer: The answer is actually a linked list app CAN BE organized into a header file, source file and main application file. It can be organized in different ways also like declaration, definition can be combined into one source file linked with the main file. All functionality can be implemented in one source file. We also may have different header files for node class and the list class, separate source files implementing these classes and a main application file which uses these classes Source: CoolInterview.com
Question: A tree can have a duplicate key



Answer: A tree cant have duplicate key, because its through key only that a node is identified.
Source: CoolInterview.com
Question: Why is the binary numbering system used in computing?



Answer: Binary number system is has 2 as its base. The way we have digits 0-9 in a decimal system and 10 is the base, we have digits 0 and 1 in a binary system whose base is 2.

In decimal a number is represented as follows using the positional values which are powers of 10.

145 = 1*10^2 + 4*10^1 + 5*10^0

Similarly a binary number is calculated as follows using the positional values which are powers of 2.

1011 = 1*2^3 + 0 + 1*2^1 + 1*2^0 = 8 + 0 + 2 + 1 = 11 in decimal.
Source: CoolInterview.com
Question: Define datastructure?



Answer: A data structure is a group of data elements grouped together under one name. These data elements, known as members, can have different types and different lengths. Source: CoolInterview.com
Question: Definitions of member functions for the LinkedList class are contained in



Answer: (B) LinkedList.cpp Source: CoolInterview.com
Question: What is linear hashing?

Answer: In linear hashing, the table is gradually expanded by splitting the buckets in order until the table has doubled its size. Source: CoolInterview.com
Question: What is the data structures used to perform recursion?

Answer: Stack. Because of its LIFO (Last In First Out) property it remembers its caller, so knows whom to return when the function has to return. Recursion makes use of 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. Source: CoolInterview.com
Question: Why do we Use a Multidimensional Array?



Answer: Multidimensional arrays are used to store information in a matrix form -- e.g. a railway timetable, schedule cannot be stroed as a single dimensional array.

You may want to use a 3-D array for storing height, width and lenght of each room on each floor of a building.
Source: CoolInterview.com
Question: What is the most efficient way of finding a loop in linklist.



Answer: We can have one member variable called "visited" of boolean type and initialized to false. whenever the node is being visited this variable is set to true. If on traversing, any node has this variable set to true initially, we conclude that Linked list has loop. Source: CoolInterview.com
Question: __________ method removes the value from the top of a stack



Answer: (B) Pop() method. Source: CoolInterview.com
Question: How do you define a vector for a data structure?

Answer: The simplest data structure that makes use of computed address to locate its elements is the one ? dimensional array and is called as a vector. Source: CoolInterview.com
Question: Difference between calloc and malloc in data structures?

Answer: malloc: allocate n bytes
calloc: allocate m times n bytes initialized to 0 Source: CoolInterview.com

1 2 3 4 5 Next



India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.078125 Seconds