Data Structure

$10.00

SKU: AMSEQ-064 Category:

Q1: What is an array? What are limitations of arrays? Give an example to show the usefulness of an arrays.
Q2: Differentiate between primitive data structure and non- primitive data structure.
Q3: How is the queue different from the stack? What is a circular queue? How do you represent it?
Q4: Give the data structure to implement two stacks in same array. Write functions to implement PUSH operation on both the stacks.
Q5: How can you find shortest path between nodes in a graph by Dijkstra’s algorithm? Explain by suitable diagram and algorithm

Case Study
1. Write a program to implement a stack which contains the address of the pointers for allocation of memory. Do the pop operation on stack and free the popped pointers.

Part – B

Q1: A linked list index is______ that represents the position of a node in a linked list.
An Integer
a variable
a character
a boolean

Q2: ________ form of access is used to add and remove nodes from a queue.
LIFO, Last In First Out
FIFO, First In First Out
Both 1 and 2
None of these

Q3: . New nodes are addes to the _______ of the queue.
Front
Back
Middle
Both 1 and

Q4: The number of possible binary trees with 4 nodes is
12
13
14
15

Q5: Which of the following algorithm solves the all – pair shortest path problem?
Dijkstra,s algorithm
Floyd’s algorithm
Prim’s algorithm
Warshall’s algorithm

Q6: Finding the location of the element with a given value is:
Traversal
Search
Sort
None of above

Q7: The size of a structure can be determined by; a. size of variable name; b. size of (struct tag)
Only a
Only b
Both a and b
None of these options

Q8: Which of the following data structure is not linear data structure?
Arrays
Linked lists
Both of above
None of above

Q9: Which of the following data structure is linear data structure?
Trees
Graphs
Arrays
None of above

Q10: The operation of processing each element in the list is known as
Sorting
Merging
Inserting
Traversal

Q11: Value of the first linked list index is:
One
Zero
-1
None of these

Q12: Preorder is same as
depth-first order
breadth- first order
topological order
linear order

Q13: ______ form of access is used to add and remove nodes from a stack.
LIFO, Last In First Out
FIFO, First In First Out
Both 1 and 2
None of these

Q14: A________ is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.
Queue linked list
Stacks linked list
Both of them
Neither of them

Q15: In an array queue, data is stored in an ______ element.
Node
Linked list
Array
Constructor

Q16: The pop () member function determine if the stack is empty by calling the _______
member function.
removeback ()
isEmpty ()
removedfront ()
hasNext ()

Q17: What happens when you push a new node onto a stack?
The new node is placed at the front of the linked list.
The new node is placed at the back of the linked list.
The new node is placed at the middle of the linked list.
No Changes happens

Q18: Arrays are best data structures
for relatively permanent collections of data
for the size of the structure and the data in the structure are constantly changing
for both of above situation
for none of above situation

Q19: Linked lists are best suited
for relatively permanent collections of data
for the size of the structure and the data in the structure are constantly changing
for both of above situation
for none of above situation

Q20: Each array declaration need not give, implicitly or explicitly, the information about-
the name of array
the data type of array
the first data from the set to be stored
the index set of the array

Q21: The elements of an array are stored successively in memory cells because
By this way computer can keep track only the address of the first element and the addresses of other elements can be calculated
the architecture of computer memory does not allow arrays to store other than serially
both of above
none of above

Q22: Which of the following is the feature of stack?
All operations are at one end
It cannot reuse its memory
All elements are of different data types
Any element can be accessed from it directly

Q23: To create a linked list, we can allocate space and make something point to it, by writing:
struct-name *pointer-variable. Which of the following statement will correctly allocate the space
pointer-variable = malloc(sizeof(*struct-name));
pointer-variable = malloc(sizeof(struct struct-name));
pointer-variable = alloc(sizeof(struct struct-name));
pointer-variable = alloc(sizeof(*struct-name

Q24: To delete a dynamically allocated array named `a`, the correct statement is
delete a;
delete a[0];
delete []a;
delete [0]a;

Q25: The five items: A, B, C, D and E are pushed in a stack, one after the other starting from A. The stack is popped four times and each element is inserted in a queue. Then two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack. The popped item is
A
B
C
D

Q26: Array passed as an argument to a function is interpreted as
Address of the array
Values of the first elements of the array
Address of the first element of the array
Number of element of the array

Q27: The memory address of the first element of an array is called
Floor address
foundation address
first address
base address

Q28: Which of the following data structures are indexed structures?
linear arrays
linked lists
both of above
none of above

Q29: Two dimensional arrays are also called
tables arrays
matrix arrays
both of above
none of above

Q30: Which of the following data structure store the homogeneous data elements?
Arrays
Records
Pointers
None

Q31: The difference between linear array and a record is
An array is suitable for homogeneous data but the data items in a record may have different data type
In a record, there may not be a natural ordering in opposed to linear array
A record form a hierarchical structure but a linear array does not
All of above

Q32: Binary search algorithm can not be applied to
Sorted linked list
sorted binary trees
sorted linear array
pointer array

Q33: When new data are to be inserted into a data structure, but there is no available space; this situation is usually called
underflow
overflow
housefull
saturated

Q34: The situation when in a linked list START=NULL is
Underflow
overflow
housefull
saturated

Q35: Which of the following is two-way list?
Grounded header list
circular header list
linked list with header and trailer nodes
none of above

Q36: The term “push” and “pop” is related to the
Array
lists
stacks
all of above

Q37: The postfix equivalent of the prefix * + a b – c d is
ab + cd -*
ab cd + – *
ab + cd * –
ab + – cd *

Q38: Sorting is useful for
Report generation
Minimizing the storage needed
making searching easier and efficient
Responding to queries easily

Q39: A data structure where elements can be added or removed at either end but not in the middle
Linked lists
Stacks
Queues
Deque

Q40: When in order traversing a tree resulted E A C K F H D B G; the preorder traversal would return
FAEKCDBHG
FAEKCDHGB
EAFKHDCBG
FEAKDCHBG

– See more at: https://atozhomework.com/products-page/product-category/assignments/data-structure/#sthash.OnMHPhZU.dpuf