-
Data structures questions
I had following question paper for data structures on 29th Oct, 2007. There were total 10 questions in the engineering paper to be done in 1 hr. I remember only 9 of those:1. A binary search tree was given. Tell the 4th smallest value in it.2. An infix expression was given. Draw a binary tree and write it in prefix/postfix notation.3. A stack has to be implemented. Following methods are given: PUSH[value]...
-
Polymorphic Data Type
What is Polymorphic Data Type? Give example
-
_____________ Memory is Volatile.
Skill/Topic: Memory, Abstract Data Types, and AddressesA) CacheB) Random AccessC) VirtualD) MainExplanation: Random Access Memory is also called a Main Memory. It is called a Volatile memory because; instructions and data contained in main memory are lost once the computer is powered down.
-
-
The removeNode() requires a reference to the node that is to be removed.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) False
-
__________ Method removes the value from the top of a stack?
Skill/Topic: Stacks using an ArrayA) push() member methodB) pop() member methodC) isFull() member methodD) isEmpty() member methodExplanation: The pop() member method removes the value from the top of a stack, which is then returned by the pop() member method to the statement that calls the pop() member method.
-
Each entry in a linked list is called a _______.
Skill/Topic: Linked ListA) LinkB) NodeC) Data structureExplanation: Each entry in a linked list is called a node. Think of a node as an entry that has three subentries. One subentry contains the data, which may be one attribute or many attributes. Another points to the previous node, and the last points to the next node. When you enter a new item on a linked list, you allocate the new node and then...
-
scanf("%s",&A.name);
printf("Enter your age: ");
scanf("%d",&A.age);
printf("Name=%s Age=%d",A.name,A.age);
}">What would be the output of the following progam?union check{ char name[10]; int age;}A;void main(){ printf("Enter your name: "); scanf("%s",&A.name);printf("Enter your age: "); scanf("%d",&A.age);printf("Name=%s Age=%d",A.name,A.age);}
-
What is the total number of equivalent relations that
What is the total number of equivalent relations that can be defined on the set (1,2,3)? 1. 8 2. 64 3. 5 4. 3
-
Performance of Algorithm
Explain how performance of algorithm is analysed?
-
What is a Register?
Skill/Topic: Memory, Abstract Data Types, and AddressesA) A register is a small amount of memory within the CPU that is used to temporarily store instructions and data.Explanation: Random Access Memory is also called a Main Memory. It is called a Volatile memory because; instructions and data contained in main memory are lost once the computer is powered down.
-
Recursive Algorithm
Explain how recursive algorithm is converted into recurrence relation with example.
-
Data Structures declared as Volatile and Const
What does it mean when a data structure is declared volatile?
What does it mean when a data structure is declared Const? -
How is memory reserved using a declaration statement?
Skill/Topic: Variables and PointersA) Memory is reserved by using a data type in a declaration statement.Explanation: The form of a declaration statement varies depending on the programming language you use. For example, here is a declaration statement for C, C++, and Java:int myVariable;
-
What is hashing?
Skill/Topic: Hash TableA) Hashing is the technique of scrambling bits of a key into a hash number.
-
Why is it necessary to hash?
Skill/Topic: Hash TableA) Hashing assures that the format of keys is uniform and unique
-
A Linked list can grow and shrink in size dynamically at _______.
Skill/Topic: Linked ListA) BeginningB) Run timeC) EndingD) None of the above
-
Link list does not have any advantage when compared to an Array.
Skill/Topic: Linked ListA) TrueB) FalseExplanation: A linked list can grow and shrink in size dynamically at runtime, whereas an array is set to a fixed size at compile time.
-
An _________ data type is a keyword of a programming language that specifies the amount of memory needed to store data and the kind of data that will be stored in that memory location.
Skill/Topic: Memory, Abstract Data Types, and AddressesA) abstract
-
Data Structures Interview Questions
Ans