You are on page 1of 34
4, (a) (b) (c) MCA(1S)—C Prog. & Data Str. through C (IT-11) 2018-19 Time : 3 hours Fuli Marks : 80 The questior's are of equal value. Answer all questions. Define the rules to define an Identifier in C. What are the Datta Types in C ? List of ranges along with the memory requirement and format specifiers on 32 bit gcc compiler. Can Global Variables be dangerous ? What is storage classes in C ? Explain with examples. Explain, type conversion in C. OR How many scope variables are there in C- Programming language ? Explain scope tules in C ? PZ-65/2 (Turn over ) (@ How Linkers Resolve Global Symbols defined at muttiple places ? 2. (@) Write a program to find the second largest, number among the list of numbers without using array. (b) Write a program to award grades in lie of ‘marks in the folowing ranges using switch... case branching structure : 90% and above: Ograde 80% to 89 :Egrade 70% to 79 :Agrade 60% to 69, :Bgrade 50% to 59 C grade 37% to 49 D grade Less than 37 :F grade OR (©) Write a program to find out the GCD of two numbers both with recursion and without recursion. PZ-65/2 (2) Contd. (@)_ Write a program to print the numbers that do not appear in the Fibonacci series. The number of such terms to be printed should be given by the user. 3, (@) Differentiate between structure, union. Also, discuss the similarities amongst them (&) What is Enum Data type 7 Write a program to demonstrate working of enum in C, What do you mean by structure padding ? oR (©) Explain how fseck () vs rewing () works in C. diferentiate fseek () and ftel () inc. (2) Write a © program to merge contents of two files into a third fle 4. (a) Construct a Binary tree from the given traversal Inorder: RQPADCEB, Preorder : APQRBCDE Inorder : BGFCED, Postorder : GFEDCBA PZ-65/2 @) (Tumover) (b) What is graph searching ? Apply BFS algorithm to find out the traversal resultfor the given graph where ‘A’ is the starting node. OR (©) Write down the quick sort algorithm. What is the time complexity of quick sort algorithm ? (d) What is AVL Tree ? Construct a AVL tree for the following values : 25, 45, 50, 55, 60, 65, 75, 85 (@) Write down the list implementation of a doubly circular queue for insertion and deletion operation. (b) Write a C programming function to implement Queues using stacks. OR (©) Write a program to create a singly linked list. Write a function too to do the following operations. (Count the number of nodes PZ-65/2 (4) Contd. (ii) Add a new node at the end (iil): Reversing the list (@ What is dynamic memory management ? Explain the Buddy System Method of memory management with its advantages and disadvantages (5) MCA(1S)—C Prog. & fz eof (>) Data Str. through C(IT-11) MCA(1S) — C Prog. & DS Through C (IT-11) 2017-18 Time : 3 hours Full Marks : 75 The figures in the right-hand margin indicate marks. 1. (a) () (c) (4) SH- 1/3 Answer all questions. Write down the advantages and disadvantages of different types of programming lan-guages. 8 Differentiate between constant and variable. What are the rules to naming a variable 7 How can you declare a variable with example. 7 OR Explain the various data types used in C programming with example. 8 Write short notes on the following : th (i) Identifiers and keywords (ii) Type casting (Turn over ) 2 fa) (b) @ Write a program input a sting and check whether itis palindrome or not 8 \Wte a program input any 10 random nos, Caloulate sum and average. 7 oR Write a program input 2 x 2 matrix to do ‘addition and print the caleulated result. 44 Write short notes on the folowing 7 (a) ) © () Storage class specifier (i) Function prototype Write a program in C to create a student Structure have the following members: Name, roll_no, sub’, sub2, sub3. Calculate total and average and also print the details ofthe student, What is a file ? How many files are there in C? Write the syntax with example of open a fil, read a file and close a file. 7 OR Write a program to count the number of characters, words and line in the input ‘supplied from the file, a SH-1/3, (2) conta SH~ 118 @) (@) Wie short notes on thefolowing: 7 Pointer (i) Malloc () & Catloe() (@) Define Stack. Write a procedure to PUSH and POP an element on tothe stack. 8 (©) Compare and contrast between Deques ‘and Priority Queue. Show their represen. tation in computer 7 OR (6) Write an algorithm insert an element after a given node in a singly linked lst. a (2) Wiite short notes on the folowing 7 70) Gatbage collection and compaction (i) Circular finked list 5,-{@) Show the step-by-step sorting of the Se) following lis by using quick sort method. 8 26, 5,37, 1,61, 11, 59, 15,48, 19, (©) Suppose the folowing sequences nodes of (Tum over) a binary tree T in preorder and inorder respectively. 7 Preorder: ABCEIFJDGHKL Inorder: E1C FJBGDKHLA Draw the diagram of the tree. OR Define Traversing a Graph. Write Breadth First Search algorithm of a graph. 8 Write short notes on the following : te (i) Threaded Binary tree (ii) Linear search o % SH - 1/3 (50) (4) MCA(1S)—C Prog. & DS Through C (IT-11) MCA(IS) — CP & DSTC a (IT- 11) ey 2016-17 Time.: 3 hours “Full Marks : 75 The figures in the right-hand margin indicate marks. Answer all questions. 1. (a) Whatis structured Programmi ing ? How is it ~“=s- —=_ implemented in C programming j language ? tt a = 8 ~(®), Distinguish between variables and constants. How are they declared in C programming 7 7 ' OR : (a) Write the salient features of C programming language. Write the overall structure of aC program. 8 (b) Whatare header files ? Mention some of the commonly used header files in C with their usage. 7 SP - 14/2 (Turn over ) 2 (2) What are library functions ? Explain the use (of any four library functions in C with proper syntax. 8 (b) Write a C program to generate the 20 Fibonacci numbers. 7 OR 8) Write a C program to read 50 integers into an array and arrange them in descending order of values, 8 fd) What are functions ? Write a C function to find the factorial of an input number. 7 - (a) What are pointers ? What isa pointer amay 7 Explain its use with a programming example. 8 1b) Write aC program to store employee data such as Employee code, Name, Designation, Basic salary inaC file. 7 OR (a) What is meant by dynamic memory allocation ? Write a C program to allocate ‘memory locations dynamically, 8 sP— 14/2 (2) Conta. (©) Whatis a user-defined data ype ? Explain its use with a programming exemple. 7 4. (@) Whatis an abstract data type ? Write a procedure to insert items into a circular queue. 7 (b) Write the advantages of doubly linked list over singly linked list. Wit a procedure to traverse a doubly inked Ist fom the rear end hile printing the contents ofthe nodes. 8 oR (a) What is a priority queue ? How is it implemented 7 Write ts usage with example, 7 (0) Wiite a procedure to delete the n-th node of 2 singly linked ist. 8 5. (@) Define a graph. How graphs are a represented in memory ? Explain the Depth First traversal ofa graph, 7 sP- 142 (3) (Tum over) ) (a) (b) Write a procedure for Merge sort. Explain each step of sorting the following numbers using merge sort technique : 8 25,59;-10, 70, 80, 45, 55, 70, 33, 22, 44 O( © oo & Eec io OR Explain the non-recursive Inorder traversal procedure for a Binary tree. What is a Binary search tree ? 7 Compare the Bubble sort technique with that of Quick sort. 8 ——_—. & % —____. SP — 14/2 (100) (4 )MCA(IS) — CP & DSTc (T=11) IS-MCA— IT (11) Data & File Struct. Th. C & «Od 2014 Time : 3 hours Full Marks : 75 The figures in the right-hand margin indicate marks. ed Answerall questions. tJ BS) (a) 1. (a) Write a Program in C to sort an array in Le descending order. 73 _ boy ‘What is queue and priority queue ? Write an algorithm to create a queue. 7 OR __ Write a program in c to insert a node at the end of a linked list. Us ro (b)- Convert the following infix expression to 4 postfix by using stack. 7 E=(A+(B*C-(D/E' F)*G)*H) BX - 1/4 (Tum over ) «2 (a) Draw the memory representation of the following binary tree 7m @ Q OMRONG) © (©) Write the non-recursive algorithm for preorder ravers 7 or _-(a) Draw the binary tree representation from the following general tree a Draw a binary search tree whose elements are inserted in the following order 60, 30, 45, 90, 55, 120, 72, 81, 12 BX— 1/4 (2) Conta AK ; = DHK EMT Ge, \3.-(6) What is Graph ? Discuss the different representation of graph with suitable ‘example from each, ed (b) What do you mean by memory management ? Discuss the different methods of dynamic memory management with their advantages and disavantages, ed OR (a) Compare and contrast between Depth first land Breadth frst graph traversal. a (>) Write short notes on the following nm () Garbage collection (i) Storage compaction 4. (@) Discuss different types of five structures with their advantages and disadvantages. (©) Draw anAVi tree for the following: 73 (© Geinampdt, pe” Samp i) Rourkela “Vian v (v) Cuttack (v) Bhadrak ax-14 (3) Ps (Tum over) (vii) Dhenkanal (vil) Koraput OR (a) What is Hashing ? Discuss different Hash functions. 7 {b) Draw a B-tree of order 3 by inserting the following keys : 7 85, 71, 92, 76, 46, 52, 35, 79, 21, 44. 5. a Mite a C program to find out the biggest number among three by using function. 73 oa different file operations with their ; syntax. 73 OR ar Write aC program using structure to accept the Roll No, Name and Mark in three different subjects for ten number of students. Calculate the subject wise total and student wise total and then display all. 74 (b). Sort the following numbers in ascending order by using Heap Sort : 74 75, 39, -27, 16, - 44, 30, 85, 92. oe a BX — 1/4 (100) (4) IS-MCA—IT (11) Data & File Struct. Th. C =, . pa’ lO 3 4S8-MCA—IT (11) i val vi a AW) "eso * hs } at —_— 2613 x oi! at & fen < X ZK Si0S Time : 3 hours Q ye Pe : By cE Full Marks : 75 The figures in the right-hand margin indicate marks. Answer all questions. re (a) Write a program in C to accept ten number / of elements in an array and find out the biggest number .smong them. 8 (b) What is linked list ? Explain its different operations 1 operation OR _ fay Write the algorithm for PUSH () and POP () operation in stack 8 sa a program in € to check whether an input string is pailindrom or not. « LV- 1/3 (Turn over ) a f ace of OF os a a 2. (a) Draw the memory representation of the following binary tree 8 \ _br Write an algorithm for pre-order traversal in atree. it OR (a) Write down the steps of converting a general tree into a binary tree with anexample. §& (b). Differentiate between linear and non-linear data structure. 7 3. (a)Explain the representation of graph in memory with suitable example. 8 Lv -1/3 (2) Conid. f ch os IS-MCA—IT (11) 2012 Time : 3 hours x Full Marks : 75 The figures in the right-hand margin indicate marks. a (a) (b) (°c) (d) (a) Answer all questions. What do you mean by ADT ? Describe the push and pop operation of stack. 8 Write a C program for insertion and deletion operations for a doubly linked list. 7 OR Explain how polynomials can be represented by using linked list, with an example. 7 Show array shows the property of ADT. Describe the memory representation of spare arrays. 8 Write down the steps for inorder and postorder tree traversal with examples from each. 10 QN-1/3 (Turn over ) (©) Write a short note on non linear data structure. 5 oR (c) Write down the steps of converting a general tree into a binary tree with an example. 10 (@) Write a short note on binary search tree. § 3, (@) How graphs can be represented in memory ? Explain the difference between adjacency list and adjacency matrix representation, 10 (©) Write a short note on garbage collection, 5 oR (©) What is dynamic memory management ? Explain the first fit and best fit methods with 10 5 giving examples from each, (4) Write @ short note on Mutist 4, (a) Describe the properties of AVL tree. Explain the difference AVL tree and B-tree with examples, 10 (b) Write a short note on Hashing 5 oR ONn-108 (2) Conta. (©) Describe the structure of indexed sequential files. 10 (@) Draw a B-tree of order 3 (show each step when you insert a new key value to the B- 410, 70, 60, 20, 110, 130, 100 and 5 tree) 160. 5. (a) Write down a complete C program to implement heap sort technique and using heap sort of the folowing numbers: 10 48, 29, 8 59, 72, 8, 42, 65, 95, 19, 82, 68. Describe the various types of searching 5 ©) techniques. OR (©). Deseribe the various types of loop supported by C language; explain each with example ‘and their syntax. 10 (d) Write a short note on merge sort. 5 QN~ 1/3 (100) (3) ISMCA—IT(11) 1S-MCA — IT - 14 2011 Time : 3 hours Full Marks : 75 The figures in the right-hand margin indicate marks. Answer all questions. ( DATA AND FILE STRUCTURE THROUGH C ) | 1. “(a) Count the number of additions necessary to j : compute fib(n) for0<=n<= 10 by the iterative and recursive methods. Where fib(n) represents algorithm or method to find a Fibonacci number ie. fib(0) =0, fib(1) =14, fib(6) = 8 etc. 5 b) Whatis Priority queue data structure ? Write down the differences between ascending Priority queue and descending priority queue. Give insertion and deletion operations of a Priority queue usin implementation in C. OR 9 array 10 WP —216/4 (Turn over) (@) Write a C routine (means a function) to interchange the ‘m' th and ‘nth elements of linked lst. (Write only the function code not the whole program), 5 (©) Design a method for keeping two stacks within a single linear array S{space size] so that neither stack overfiows until all of ‘memory is used and entire stack is never shifted to a different location within the memory. Write C routines pusht, push 2 Popt, and pop 2 to manipulate the two stacks (Note the two stacks grow towards eachother) 10 2 (@) Obtain a binary tree corresponding to the following directed tree : 5 ‘WP ~216/4 2) Conta, preorder (b) Create a Bayern lewd Pe ‘and inorder traversal given below and show tree ‘each step for drawing up to complete : oo ran Preorder :ABDGHEICF JK Inorder: GDHBEIAC JFK OR Je for the following (a) Draw the binary tree for : arithmetic expression (b) Wie functon hat accept pointertoa sinary ee and retus a pointe toa new binary te that isthe mirorimage othe fst (tat i, al lft subrees are now right subtrees and vie vers) a8 void miro (Tree, Tee" newe) 10 2 @) Represent ecraph tgs ghen ow: ()_ Byan adjacency matrix giving arc costs. we -216/4 (3) (Tumover) (ii) By alinked adjacency list with arc costs indicated. (b) Write down the algorithms for following graph traversal techniques : 5+5= 10 , “i | Pepth first search SS , (iif Breadth first search i: OR (a) What do you mean by multilist (multiple threaded list) ? Write down the the important features of multilist organization. 5 (b) What do you mean by garbage collection ? What is a garbage collector ? Describe the WP ~216/4 (4) Contd. re working mechanism of marking phase and collection phase. Write down and explain the marking algorithm for garbage collection. 5 10 4. {@) Describe the structure of sequential files. 5 (b) By taking the following key values create and draw a B-tree of order 5 (show each step when you insert a new key value to the B-tree) : 10 L eS Cc wo 9, 60, 20, 110, 40, 80, 130, 100, 50, i 190, 90, 180, 240, 30, 120, 140, 160. OR z r (a) Write a short note o: dynamic hashing 5 s (b) -Construct an AVL tree by taking the following key values (show each step when you insert a new key value to the AVL-tree) : 10 50, 40, 35, 58, 48, 42, 60, 30, 33, 25: Nat | (a) What are the main differences between library functions and user defined functions ——— —_ inc language ? _ 5 P-—216/4 (5) (Turn over ) ~~ (b) Write down a complete C program to implement selection sort technique ang show that how program efficiently sorts the following numbers when given as input: 10 75, 35, 42, 13, 87, 24, 64, 57. OR (a) Write down the procedure for binary search technique and show the implantation in C \anguage. § (©) Write down a complete G program toi’ implement partition’ Exchange Sort 4 (Quick sort) technique and show that how your program efficiently sorts the following numbers when given as input : 10 48, 29, 8, 59, 72, 88, 42, 65, 95, 19, 82, 68. er © WP — 216/4(100) (6) 1S-MCA—IT-11 oe Darter StreereteucZ ht) cok ) Suk S909 MCA -1S-IT-11 _§t 2010-11 om p, — 11312 o 3208 7 Sees T-11 501> GR OMe. Time : 3 Hours Full Marks : 75 Answer ALL questions. The figures in the right hand margin indicate marks. 1. hat is a stack ? Explain the Application ‘of the Stack: Write algorithim-topush and pop elements into the stack. [15] OR What is a Queue ? Explain different types of Queue. How we _—“cah implement Queue in C language ? Write the difference between Stack and Queue. 2. (a) Find out the inordet, pre order and post order traversal for ive tree. (9] P.T.O. (2) on hai Bry war Conse ry mar eto eve Fea 18,875,902, 16,143.20 184 IW Dcyegintespsinstiyine. 16 on ite areas pds of akinay twee. 3. (@)_Write the defination of graph? Explain the typeof graphs, 7 withsitable example. 5 or _Fifé ot tne Adjacency mati for the given graph, EY 18) Find the minimum path from A to Jin the given graph Ging (10) (31 oR ‘Whatis memory compaction Briefly explain Firstfit,Bestfit and Worstfitwithsutableexample. 4. What is hashing? Explin the ipes of hashing with suitable example How linear probing resolves Collision ? Explain with eagle 03) oR rite short notes on M0) Baree — A iret Aeon 5. (4) Daldamaxteap fom he falling mbar, (7 <4, 30, 50, 22, 60, 55, 77, $5 on Explain binary search with suitable example. & loop ? How we can construct loop in C language ? 7 Explain each of them with suitable example, 18] oR _AWhat is 0 painter? Explain it, Write the difference between all by value and call By reference. oo0 AW ey i MCA-IS-IT—11 2009-10 Full Marks : 75 Time : 3 hours All questions carry equal marks aw -» gf Answer all questions Data and File Structure Through C a Explain ADT with an. example, ° (> How 2-d arrays are represented in memory ? Explain. OR ] (a) Illustrate the use of stack for infix to postfix conversion ofan expression. RK-09/100 (Turn Over) @ (Y Whatistinkedbit? How isitused for representation oR -~—ofpolynomials? Write noteson: 2% 2 Wotisbinny re? Witte rocasiv lg for sind (© Gates stein 0) Wit the nonce algortn for postorer ©) Drsamisenoy angen aera bine 4. Whtavint unt Epa whence te tadvnagson pletion, mm é o (© pin te covioot geal eet bik tee timo irae: ©) WoaisBST Een apc © AvLte en GF What isa graph 2 Explain the adjacency matix er ‘orstatinofa pap Witte lori dept Sete ph 5 Ao Phish esse eng (Comimed) Gen ove (4) (b) Differentiate between structure and union in C with suitable examples. Or ue following sorting techniques : (a) Bubble sort (b) Quick sort. RK-09/100 MCA-IS-IT—11 = Weth out COA Duy MCA-IS-IT-11 2008-09 Full Marks : 75 Pass Marks : 30 Time : 3 Hours Answer ALL questions. The figures in the right hand margin indicate marks. DATA & FILE STRUCTURE THROUGH C a a) Write short notes on abstract data types (ADT). x Or (5 What are the applications of stack and queues ? b) Discuss the different types of linked list. Or (10 How can represent the record in memory. 2. a) Define non-linear data structure. Or [5 Discuss the applications of binary tree. [P.T.0. ) Write an algorithm for preordered traversal of “binary tee or tno What is binary search tree ? How it uses in computer system, 8) What is garbage collection ? or 6 Define adjacent matrix ? b) Discuss details on dynamic memory management. or 10 Differentiate between depth-first and breadth first graph traversal a) How to convert general tree to binary tree ? iy or 6 What is hashing 7 » a » «3p Differentiate among sequential, indexed sequential and direct access fle structure. or 10 Define B-tree, How it is used in computer system 7 Define two-way merge sort _ OF 6 ‘What is the structure data types in C Language 7 Discuss the Heap sort with sultable examples. or {10 Write @ program using C to find out the largest umber. /NNTH/06 a “SHIP ZS : MCA-IS-IT-11 2007-08 Full Marks : 75 Pass Marks : 30 Time : 3 Hours D Answer ALL questions. Figures in the right hand margin indicate marks. DATA & FILE STRUCTURE THROUGH C a: a) Define array and its memory representation. Or i) Discuss the use of priority Queues. b) Write algorithm using C-Language notation i) for deleting an element at the end of the Circular-linked-list. ii) for inserting an element at the start of the Double-linked list. Or [10 Mite the different algorithm of stack using C-notation. [P.T.O. ov (2) C7 eae between linear and non-tinear data structure. | or 6 Convert the following expression to pre- order and post-order notation : (atb)e cia. b) Differentiate among pre-order, in-order, post Corder tree traverse with their algorithms and proper examples. or (10

You might also like