## Solution of Assignment Synopsis & Project Dissertation Report

Without time Running Time running is not applicable for old student.

 Title Name Amity Solved Assignment BSC IT for Data Structure through C Language University AMITY Service Type Assignment Course B.Sc-(IT) Semester Semester-III Course: B.Sc-(IT) Short Name or Subject Code Data Structure through C Language Commerce line item Type Semester-III Course: B.Sc-(IT) Product Assignment of B.Sc-(IT) Semester-III (AMITY) Price PRICE INR Click to View Price

## Questions:-

Data Structure Through C Language

Section – A

Question Section

Marks - 10

; ; ; ; ; ; ; ;

 Sr. No Question 1 Give the difference between Recursion and Iteration. Write the codes to display the reversing the string. 2 Convert the following infix notation to postfix notation (A + B)  * C /D 3 What is a Stack ? Write C function to push item into the stack. 4 Define array? Write a program to store 10 salesmen’s amount in an array and find out total sale & best sales amount. 5 What do you mean by Time and Space complexity and how to represent these complexity? 6 Write pseudo code to add node at the end in circular linked list. 7 Write algorithm to perform inorder traversal of binary tree. 8 Trace quick sort on the list L= {11, 34, 67, 78, 78, 78, 99}. What are your observations?

Section –B

Draw the binary search tree whose elements are inserted in the following order:
50 72 96 94 107 26 12 11 9 2 10 25 51 16 17 95

Q.No 1: What is the height of the tree?

File Name :

Q.No 2: Which levels have the maximum number of nodes that they could contain?

File Name :

Q.No 3: What is the maximum height of a binary search tree containing these nodes?  Draw such tree.

File Name : .

Section-C

Question

 1)      Which of the following statements about binary trees is NOT true? (A): Every binary tree has at least one node. (B): Every non-empty tree has exactly one root node. (C): Every node has at most two children. (D): Every non-root node has exactly one parent.

2)      What is the expected time required to search for a value in a binary search tree containing n nodes?

(A): O(1)

(B): O(log n)

(C): O(n)

(D): O(n log n)

3)      Which among the following is odd one out?

(A): printf

(B): fprintf

(C): putchar

(D): scanf

 4)      To represent hierarchical relationship between elements, Which data structure is suitable? (A): Dequeue (B): Priority (C): Tree (D): Graph

What is the infix version of the following postfix expression? x 12 + z 17 y + 42 * / +

(A): (x + 12 + z) / (17 + y * 42)

(B): x + 12 + z / 17 + y * 42

(C): x + 12 + z / (17 + y) * 42

(D): x + 12 + z / ((17 + y) * 42)

6)      Which of the following data structure is non linear type?

(A): Strings

(B): Lists

(C): Stacks

(D): Graph

7) the data structure which allows deletions at both ends of the list but insertion at only one end.

(A): Input restricted dequeue

(B): Output restricted qequeue

(C): Priority queues

(D): Stack

8)Header node is used as sentinel in .....

(A): Graphs

(B): Stacks

(C): Binary Tree

(D): Queues

9)      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.

(A): Queue linked list

(B): Stacks linked list

(C): Both of them

(D): None of them

 10)………… is very useful in situation when data have to stored and then retrieved in reverse order. (A): Stack (B): Queue (C): list (D): linked list 11)  Stack is also called as (A): Last in first out (B): First in last out (C): Last in last out (D): First in first out
 12) An array is a collection of (A): Different data types scattered throughout memory (B): The same data type scattered throughout memory (C): The same data type placed next to each other in memory (D): Different data typed placed next to each other in memory
 13)  The array index starts from …………………. (A): 0 (B): 1 (C): 100 (D): A 14) In a matrix declared by int A, how many rows and columns are there ? (A): 2 rows and 2 columns (B): single row and single column (C): 2 rows and 3 columns (D): 6 rows and 3 columns 15) Pointer points to the …………. (A): Address of a variable (B): Value of a variable (C): Value and address of a variable (D): None of them 16) We access structure member through pointer using …….. (A): & operator (B): (.) operator (C): (-> operator) (D): * operator 17) Insertion and deletion in Stack is called …………. operations. (A): Enque and dequeue (B): Insert and cut (C): Push and Pop (D): give and take 18) If the items 10, 20, 30 and 40 are inserted in the stack in the given ascending order, and then afterwards POP operation is performed, which item is deleted first ? (A): 10 (B): 20 (C): 30 (D): 40 19) In the given function to display the stack elements what does int top gives ? (A): stack size (B): position of top item (C): value of stack items (D): None of them 20) The given expression is in the form of ……………… +AB (A): infix (B): postfix (C): prefix (D): none 21)A linked-list is a collection of records, called ……………….. (A): vertices (B): leafs (C): branches (D): nodes 22) In a tree the indegree of the root is …………… (A): 0 (B): 1 (C): 2 (D): 3 23) Which function of C is used for memory allocation ? (A): malloc (B): alloc (C): strcmp (D): getch 24) In a deque (double ended queue) we can insert items from (A): front end (B): rear end (C): front and rear end (D): from the middle 25) A node in a doubly linked list has …………. parts (A): 0 (B): 1 (C): 2 (D): 3 26) If a complete binary tree has height = 3, what is the degree of the root node ? (A): 0 (B): 1 (C): 2 (D): 3 27) The unique predecessor of a node is called the ……………………. (A): mother (B): parent (C): teacher (D): daughter 28) Links between the pair vertices in the graph is called as : (A): line (B): edge (C): corner (D): nodes 29) If a graph has only four vertices, how many edges is formed by a spanning tree ? (A): 1 (B): 2 (C): 3 (D): 4 30) Which one means the fastest ? (A): O(1) (B): O(log n) (C): O(n) (D): O(n log n) 31) Which of the following data structure may give overflow error, even though the current number of elements in it is less than its size ? (A): Stack (B): circular queue (C): double ended queue (D): simple queue 32) Queue can be represented by : (A): array (B): linked list (C): tree (D): Only (1) and (2) 33) In Circular Link list (A): Head node contains the address of tail node. (B): Tail node contains the address of the head. (C): Internal node contains the address of the head node. (D): Tail node contains the address of the middle node. 34) An adjacency matrix representation of a graph cannot contain information of (A): nodes (B): edges (C): Direction of edges (D): parallel edges 35) Which of the following sorting method follow the strategy “ Divide and Conquer” ? (A): Bubble sort (B): Selection sort (C): Insertion sort (D): Merge Sort 36) Which of the following sorting method needs more memory space ? (A): Bubble sort (B): Selection sort (C): Insertion sort (D): None 37) Which of the following sorting method uses the partition technique ? (A): Bubble sort (B): Selection sort (C): Insertion sort (D): Quick sort 38) In a undirected graph G, V={A, B, C, D} and E = ,B),(A,C),(A,D),(B,C), (B,D), (CD)}. How many edges are there ? (A): 4 (B): 5 (C): 6 (D): 7 39) Which of the following data structure may give overflow error, even though the current number of elements in it is less than its size ? (A): Stack (B): circular queue (C): double ended queue (D): simple queue 40) Maintain the hierarchy from top to bottom concerning the tree. (A): leaf nodes, internal nodes, root (B): internal nodes, root, leaf nodes (C): root, internal nodes, leaf nodes (D): root, leaf nodes, internal nodes

## 4.8 / 5

#### Rating breakdown

5
80% Complete (danger)
1
4
80% Complete (danger)
1
3
80% Complete (danger)
0
2
80% Complete (danger)
0
1
80% Complete (danger)
0 January 29, 2015
This was nice in buy
Assignment from solve zone is probably one of the first preference of students. January 29, 2015
This was nice in buy
Assignment from solve zone is probably one of the first preference of students. 08-May, 2019
This was nice in buy
Assignment from solve zone is probably one of the first preference of students.