Você está na página 1de 12

Contact www.solvedcare.

com for best and lowest cost solution or email solvedcare


@gmail.com

Data Structure through C Language V3


Assignment A
1 . A two-dimensional array defined as a [4 7, -1 .3] requires 2 bytes of storage s
pace for each element. If the array is stored in row-major form, then calculate
the address of element at location a[6,2]. Give the base address is 100.
2 . Write a C program to implement bubble sort.
3 . Write a program in C to show PUSH and POP operations in a stack.
4 . Write the algorithms for the insertion and deletion operations performed on
the circular queue.
5 . What is double linked list? What are the advantage and disadvantage of doubl
e linked list ?

6 . What is a binary search tree? Construct a binary search tree from these numb
ers 50, 30, 60, 22, 38, 55, 34.
7 . Explain the Dijkastra s Algorithm.
8 . What do you mean by the Hashing? Explain different method of hashing.

Assignment B

Case Detail :
1. If you are using C language to implement the heterogeneous linked list, what
pointer type will you use?

Assignment C

Question No. 1
________________________________________
. The memory address of the first element of an array is called
Options
Floor Address
Foundation Address
First Address
Base Address

Question No. 2
________________________________________
memory address of fifth element of an array can be calculated by the formula
Options
a) LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words pe
r memory cell for the array
b) LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words
per memory cell for the array
LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words pe
r memory cell for the array
None of above

Question No. 3
________________________________________
Which of the following data structures are indexed structures?
Options
linear arrays
linked lists
both of above
none of above

Question No. 4
________________________________________
Which of the following is not the required condition for binary search algorithm
?
Options
The list must be sorted
There should be the direct access to the middle element in any sublist
There must be mechanism to delete and/or insert elements in list
none of above

Question No. 5
________________________________________
. Which of the following is not a limitation of binary search algorithm?
Options
Must use a sorted array
requirement of sorted array is expensive when a lot of insertion and deletions
are
There must be a mechanism to access middle element directly
Binary search algorithm is not efficient when the data elements are more than

Question No. 6
________________________________________
Two dimensional arrays are also called
Options
Tables arrays
Matrix Arrays
both of above
none of above

Question No. 7
________________________________________
A variable P is called pointer if
Options
P contains the address of an element in DATA.
P points to the address of first element in DATA
P can store only memory addresses
P contain the DATA and the address of DATA

Question No. 7
________________________________________
A variable P is called pointer if
Options
P contains the address of an element in DATA.
P points to the address of first element in DATA
P can store only memory addresses
P contain the DATA and the address of DATA

Question No. 8
________________________________________
Which of the following data structure can't store the non-homogeneous data eleme
nts?
Options
Arrays
Records
Pointers
None

Question No. 9
________________________________________
. Which of the following data structure store the homogeneous data elements?
Options
Arrays
Records
Pointers
None

Question No. 10
________________________________________
Each data item in a record may be a group item composed of sub-items; those item
s which are indecomposable are called
Options
Elementary items
Atoms
Scalars
All of above

Question No. 11
________________________________________
The difference between linear array and a record is
Options
An array is suitable for homogeneous data but the data items in a record may ha
ve
In a record, there may not be a natural ordering in opposed to linear array.
A record form a hierarchical structure but a lienear array does not
All of above

Question No. 12
________________________________________
Which of the following statement is false?
Options
Arrays are dense lists and static data structure
data elements in linked list need not be stored in adjecent space in memory
pointers store the next data element of a list
linked lists are collection of the nodes that contain information part and next
pointer

Question No. 13
________________________________________
Binary search algorithm can not be applied to
Options
Sorted linked list
Sorted binary trees
Sorted linear array
Pointer array

Question No. 14
________________________________________
When new data are to be inserted into a data structure, but there is no availabl
e
space; this situation is usually called
Options
Underflow
Overflow
Houseful
Saturated

Question No. 15
________________________________________
The situation when in a linked list START=NULL is
Options
Underflow
Overflow
Housefull
Saturated

Question No. 16
________________________________________
Which of the following is two way lists?
Options
grounded header list
circular header list
linked list with header and trailer nodes
none of above

Question No. 17
________________________________________
Which of the following name does not relate to stacks?
Options
FIFO lists
LIFO list
Piles
Push-down lists

Question No. 18
________________________________________
The term "push" and "pop" is related to the
Options
Array
Lists
Stacks
All Of Above

Question No. 19
________________________________________
A data structure where elements can be added or removed at either end but not in
the middle
Options
Linked lists
Stacks
Queues
Deque

Question No. 20
________________________________________
When in order traversing a tree resulted E A C K F H D B G; the preorder travers
al would return
Options
FAEKCDBHG
FAEKCDHGB
EAFKHDCBG
FEAKDCHBG

Question No. 21
________________________________________
. Value of the first linked list index is________
Options
One
Zero
1
None of these

Question No. 22
________________________________________
A linked list index is ____ that represents the position of a node in a linked l
ist
Options
An Integer
A variable
A character
A Boolean

Question No. 23
________________________________________
Why is the constructor of the Queue Linked List class empty?
Options
Because initialization of data members of the Linked List class is performed by
the constructor of the Linked List class.
Because initialization of data members of the Linked List class is performed by
the destructor of the Linked List class.
Because initialization of data members of the Queue Linked List class is perfor
med by the constructor of the Linked List class.
Because initialization of data members of the Queue Linked List class is perfor
med by the destructor of the Linked List class
Question No. 24
________________________________________
_______ form of access is used to add and remove nodes from a queue
Options
LIFO Last In First Out
FIFO, First In First Out
Both 1 and 2
None of these

Question No. 25
________________________________________
______ form of access is used to add and remove nodes from a stack
Options
LIFO
FIFO
Both 1 and 2
None of these

Question No. 26
________________________________________
New nodes are added to the _____ of the queue.
Options
Front
Back
Middle
Both 1 and 2

Question No. 27
________________________________________
A _______ is a data structure that organizes data similar to a line in the supe
rmarket, where the first one in line is the first one out.
Options
Queue linked list
Stacks linked list
Both of them
Neither of them

Question No. 28
________________________________________
In an array queue, data is stored in an _____ element
Options
Node
Linked list
Array
Constructor

Question No. 29
________________________________________
The pop () member function determines if the stack is empty by calling the _____
member function
Options
removeback()
isEmpty()
removedfront()
hasNext()

Question No. 30
________________________________________
What happens when you push a new node onto a stack?
Options
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
uestion No. 31
________________________________________
Which of the following algorithm solves the all pair shortest path problem?
Options
Dijkstra,s algorithm
Floyd s algorithm
Prim s algorithm
Warshall s algorithm

Question No. 32
________________________________________
The operation of processing each element in the list is known as
Options
Sorting
Merging
Inserting
Traversal

Question No. 33
________________________________________
To delete a dynamically allocated array named `a`, the correct statement is
Options
delete a;
delete a[0];
delete []a;
delete [0]a;

Question No. 34
________________________________________
The memory address of the first element of an array is called
Options
Floor address
Foundation address
First address
Base address

Question No. 35
________________________________________
Which of the following data structure store the homogeneous data elements?
Options
Arrays
Records
Pointers
None

Question No. 36
________________________________________
The number of possible binary trees with 4 nodes is
Options
12
13
14
15

Question No. 37
________________________________________
Which of the following data structure is not linear data structure?
Options
Arrays
Linked lists
Both of above
None of above

Question No. 38
________________________________________
Finding the location of the element with a given value is:
Options
Traversal
Search
Sort
None of above

Question No. 39
________________________________________
Preorder is same as
Options
depth-first order
breadth- first order
topological order
linear order

Question No. 39
Which of the following is the feature of stack?

Options
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
Contact www.solvedcare.com for best and lowest cost solution or email solvedcare
@gmail.com

Você também pode gostar