4 Mca Data Structure C 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Master of Computer Application

Data Structure through Algorithms with ‘C’

Max. Marks: 70 Time: 2 Hours

Section A
Choose the correct answer. Each question carries 1 mark. 1x10 = (10 Marks)
1. Which of the following data structure is non-linear type?
A) Strings
B) Lists
C) Stacks
D) Tree
2. Which of the following data structure is linear type?
A) Array
B) Tree
C) Graphs
D) Hierarchy
3. The logical or mathematical model of a particular organization of data is called a ………
A) Data structure
B) Data arrangement
C) Data configuration
D) Data formation
4. The simplest type of data structure is ………………
A) Multidimensional array
B) Linear array
C) Two dimensional array
D) Three dimensional array
5. Linear arrays are also called ……………….
A) Straight line array
B) One-dimensional array
C) Vertical array
D) Horizontal array
6. Arrays are best data structures …………
A) For relatively permanent collections of data.
B) For the size of the structure and the data in the structure are constantly changing
C) For both of above situation
D) For none of the above
7. Which of the following data structures are indexed structures?
A) Linear arrays
B) Linked lists
C) Graphs
D) Trees
8. Each node in a linked list has two pairs of ………….. And ……………….
A) Link field and information field
B) Link field and avail field
C) Avail field and information field
D) Address field and link field
9. A …………………… does not keep track of address of every element in the list.
A) Stack
B) String
C) Linear array
D) Queue
10. When does top value of the stack changes?
A) Before deletion
B) While checking underflow
C) At the time of deletion
D) After deletion

Section B
Answer any 5 questions. Each question carries 6 marks. (6x5=30 marks)

1. Write an algorithm to in1ple1nent Kruskal' s algorithrn. Also explain with the help of a suitable
example.
2. Write the postfix form of each of the following infix expressions:
a) A-B+(M$N) * (O+P)-Q/R"S*T+Z
b) K+L-M*N+(O "P)*W/U/V*T+Q
3. Write a progran1 in C language for perforn1ing all the operations in a queue.
4. Write a program to insert a new element in the given unsorted array at Kth position.
5. Differentiate between an array and a stack.
6. Consider a two dimensional array A of order [25*4]. The base address of the array is 400, words per
memory cell is 4. Find the address of A [12, 4] using row major and column major addressing.
7. Explain Binary Tree and Binary Search Tree

Section C
Answer any 3 questions. Each question carries 10 marks. (3x10=30 marks)

1. Write a program in C language for Insertion Sort


2. How will you detect a cycle in a directed as well as in an undirected graph? Explain with the help of
an example.
3. Write a program to implement linear linked list, showing all the operations that can be performed
on a linked list.
4. Differentiate between a singly linked list and a doubly linked list.
5. Write an algorithm for insertion in a sorted linked list.

You might also like