BCA All Subject Notes
|BACHELOR IN COMPUTER |
|APPLICATIONS |
|Term-End Examination |
|June 2009 |
|CS-62 'C' Programming & Data Structure |
|Time: 2 Hours Maximum Marks : 60 |
|[pic] |
|Note: Question number 1 is compulsory. Answer any three questions from the rest. All algorithms should be written nearer to 'C' language. |
|[pic] |
|1. |(a) |What do you mean by Sparse Matrix. Write a program to compute the transpose a sparse matrix.[6 marks] |
| |(b) |List the advantages and disadvantages of doubly link list over singly link list. What is a priority Queue? Write an algorithm for |
| | |inserting an element into circular queue.[8 marks] |
| |(c) |Write an algorithm for insertion sort. Apply insertion sort algorithm for the following list of elements. |
| | |17,36,95,25,54,72,68 [7 marks] |
| |(d) |Define Postorder and Preorder traversal of tree. Given the following Postorder and Preorder traversals,construct the corresponding|
| | |Binary tree. |
| | |Post order: J H D E B I F G C A |
| | |Pre order: D J H B E A F I C G |
| | |[8 Marks] |
|2. |(a) |What is recursion? Write a recursive function to find factorial of a number.[4 Marks] |
| |(b) |Convert the following infix expression into postfix. Write an algorithm for the same. |
| | |(i) ((A-(B+C)*D)/(E+F)) |
| | |(ii)(A^(B*C)-D)+(E/F)*(G+H) |
|3. |(a) |What is B-tree? What are the properties of a B-tree of Order M. [5 marks] |
| |(b) |Write a program in C for implementing Breadth First Search (BFS). |
|4. |(a) |What is a File? Write a 'C' program to copy the contents of one file to another file. |
| |(b) |Define Binary Search Tree (BST. Write an algorithm to insert a node in a BST. [5 marks] |
|5. | |Write short notes on the folowing: [10 marks] |
| | |(a) Stack |
| | |(b) Circular Link List |
| | |(c) Complete Binary Tree |
| | |(d) Storage Pool |
| | |(e) Pointers |
|BACHELOR IN COMPUTER |
|APPLICATIONS |
|Term-End Examination |
|December 2007 |
|CS-62 'C' Programming & Data Structure |
|Time: 2 Hours Maximum Marks : 60 |
|[pic] |
|Note: Question number 1 is compulsory. Answer any three questions from the rest. All algorithms should be written nearer to 'C' language. |
|[pic] |
|1. |(a) |Define an AVL tree. Construct a height balanced tree for the following list of elements: 4, 6, 12, 8, 4, 2, 15, 7, 3 [8 marks] |
| |(b) |Write an algorithm to emplement linked list using pointers and perform the following tasks: [10 marks] |
| | |Delete a node in the list, given a pointer to that node. |
| | |Write a function to reverse the linked list. |
| |(c) |Write an algorithm that reads m*n matrix "A" and p*q matrix "B", checks whether these matrices are multipliable in either order or|
| | |not. (e.g wheter A*B or B*A is defined). Further, if A*B or B*A is defined then calculate the product. Note : Show proper error |
| | |handling also. [7 marks] |
| |(d) |Calculate the time complexity of the following code by using Big 'O' notation : [5 marks] |
| | |scanf("%d",&n); |
| | |scanf("%d",&m); |
| | |for(i=0;i ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.