SHREE H. N. SHUKLA COLLEGE OF I.T. & MGMT. (AFFILIATED TO SAURASHTRA UNIVERSITY) 2 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot – 360001 Ph.No–(0281)2440478,2472590 3 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot - 360001 Ph.No–(0281) 2471645 PRILIMS EXAM (2011) STREAM: BSCIT-2 SUB: DS TIME: - 2:30 HOURS MARKS: 70 Q-1 a) Attempt any three:1) 2) 3) 4) 5) 6) [6M] What is pointer? Explain pointer concepts. Differentiate homogeneous data type and non-homogeneous data type. Explain array of structure and array within structure with example. Explain calloc() and realloc() with example. Differentiate stack and queue. Difference between r+ and w+ file opening mode. b) Attempt any three: 1) 2) 3) 4) 5) 6) 7) 8) [9M] Explain storage structure of array. What is stack? Explain applications of stack. Differentiate text file and binary file. What is error handling? In which cases there is possibility to get the errors in file and explain error handling functions. What is data structure? What is primitive and non-primitive data structure? Explain non-primitive data structure. What do you mean by memory allocation? List types of memory allocation and explain DMA with malloc(). Explain fwrite() , putw() and getw(). Explain file opening modes. Shree H.N.Shukla College of I.T & Management ”Sky is the Limit” 1 SHREE H. N. SHUKLA COLLEGE OF I.T. & MGMT. (AFFILIATED TO SAURASHTRA UNIVERSITY) 2 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot – 360001 Ph.No–(0281)2440478,2472590 c) Attempt any two: 3 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot - 360001 Ph.No–(0281) 2471645 [10M] 1) Implement queue with following operations. 1. Insert() 2.delete() 3. display 2) Implement circular singly linked list with following function. a. Insert() 2.delete() 3.create() 4..sort() 3) What are command line arguments? Write a program to copy the data of one file to another file using command line arguments. 4) Display the data of doubly linked list in reverse order (Backward Display). 5) What is searching? List types of searching? Write algorithm for binary search. Q-2 a) Attempt any three: 1) 2) 3) 4) 5) 6) [6M] Differentiate circular singly linked list and singly linked list. Give the advantages of circular queue over simple queue. Give the advantages of pointer. What is linked list? Give the application of linked list and advantages . What is recursion? Explain recursion with example. What is binary tree? Define strictly binary tree and complete binary tree. b) Attempt any three: [9M] 1) What is parameter passing? Explain call by value and call by reference and differentiate both of them. 2) Explain how the pointer is passed as function argument. 3) Compare insertion sort and selection sort and write algorithm for selection sort. Shree H.N.Shukla College of I.T & Management ”Sky is the Limit” 2 SHREE H. N. SHUKLA COLLEGE OF I.T. & MGMT. (AFFILIATED TO SAURASHTRA UNIVERSITY) 2 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot – 360001 Ph.No–(0281)2440478,2472590 3 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot - 360001 Ph.No–(0281) 2471645 4) Explain linear search and write program for it. 5) Explain following functions: a. Ftell() b.fseek() c. rewind() d.fread() 6) Write a short note on static and dynamic array and differentiate both of them. 7) Explain following functions: a. Fopen() b.fclose() c.fgetc() d. fputc() c) Attempt any two: [10M] 1) What is UDF? Why there is need of UDF? Explain types of UDF. 2) Explain following operations of stack: a. Push() b.pop() c.peep() d. update() 3) What is sorting? List out types of sorting? Explain all iterations (pass) of bubble sort for following example. 5 6 1 5 2 4) Write the program for merge sort. 5) What is header linked list? Implement following operations in header linked list a. Create() b. traversal ()(display) c. insertion() Q-3 MULTIPLE CHOICE QUESTIONS :1) Which function is used to deallocate memory? 1) free 2) remove 3) delete 2) Which type of function is main()..? 1) Library 2) Inbuilt Library 3) [20M] 4) clear 4) User Calling 3) Variables inside parenthesis of functions declarations have ………..level access. 1) Local 2) Global 3) Module 4) Universal Shree H.N.Shukla College of I.T & Management ”Sky is the Limit” 3 SHREE H. N. SHUKLA COLLEGE OF I.T. & MGMT. (AFFILIATED TO SAURASHTRA UNIVERSITY) 2 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot – 360001 Ph.No–(0281)2440478,2472590 3 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot - 360001 Ph.No–(0281) 2471645 4) We declare the function User Defined with …..if it does not have any return type. 1) Long 2) double 3) void 4) int 5) Which of the following sorting algorithms perform O(n2) time in worst case? 1) Insertion sort 2) Bubble sort 3) Selection sort 4) All of above 6) What is the worst case time for merge sort to sort an array of n elements? 1) O(log n) 2) O(n) 3) O(n logn) 4) O(n2) 7) Quick sort uses …………for implementation. 1) Recursion 2) Traversal 3) Heaps 4) Queues 8) Which one is not Divide and Conquer Algorithm? 1) Merge Sort 2) Quick Sort 3) Heap Sort 4) None 9) What is the worst case time for linear search finding single item in an array? 1) Constant time 2) Logarithmic time 3) Linear time 4) Quadratic time 10) Which additional requirement is placed on array, so that binary search may be used to locate an entry? 1) The array elements must form a heap. 2) The array must have at least 2 entries. 3) The array must be sorted. 4) The array’s size must be a power of two 11) To set a file position at desired place which function is used. 1) ftell() 2) rewind() 3) ferror() 4) fseek() Shree H.N.Shukla College of I.T & Management ”Sky is the Limit” 4 SHREE H. N. SHUKLA COLLEGE OF I.T. & MGMT. (AFFILIATED TO SAURASHTRA UNIVERSITY) 2 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot – 360001 Ph.No–(0281)2440478,2472590 3 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot - 360001 Ph.No–(0281) 2471645 12) To set the current position in the file in terms of bytes from the start which function is used? 1) ftell() 2) rewind() 3) ferror() 4) fseek() 13) When we open a file but somehow file is not open properly then which value will be return: 1) NULL 2) EOF 3) feof() 4) FOE 14) An argc and argv[] is which kind of variable 1) Command line argument 2) Simple function argument (3) Local variable 4) global variable 15) A file pointer is at the end of file marker (EOF) or not, which function is used: 1) ftell() 2) rewind() 3) ferror() 4) feof() 16) Which of the following is an example of non-homogeneous data type? 1) Array 2) structure 3) Both 4) None 17) Queue is which type of data structure? 1) Primitive 2) Non-primitive 3) Both 18) Which is the area in which free memory is stored? 1) Stack 2) heap 3) local variable 4) None 4) None 19) Which function is used when we want to change the size of previously allocated memory? 1) malloc() 2) calloc() 3) realloc() 4) None 20) Linked list is also known as …………….? 1) Self-referential 2) Numeric data structure Shree H.N.Shukla College of I.T & Management 3) Both 4) None ”Sky is the Limit” 5 SHREE H. N. SHUKLA COLLEGE OF I.T. & MGMT. (AFFILIATED TO SAURASHTRA UNIVERSITY) 2 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot – 360001 Ph.No–(0281)2440478,2472590 3 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot - 360001 Ph.No–(0281) 2471645 21) In Grounded header linked list, the next part of last node points to? 1) NULL 2) -1 3) First Node 4) None 22) One difference between stack and queue is: 1) Queues require dynamic memory, but stacks do not. 2) Stacks require dynamic memory, but queues do not. 3) Queue uses only one end of structure whereas queues use two ends. 4) Stacks use two ends of the structure, queues use only one. 23) Stack is a…………………. 1) Primitive data structures 2) Non-primitive data structures 2) Non-linear data structure 4) Data types. 24) Which of the following applications may use stack? 1) A parenthesis balancing program. 2) Keeping track of local variables at run time. 3) Syntax analyzer for a compiler. 4) All of the above 25) New nodes are added to the …………… of queue. 1) Front 2) back 3) middle 4) Both 1 and 2 26) In tree construction, which is the suitable efficient data structure? 1) Array 2) Linked list 3) Stack 4) Queue 27) In link lists, there are no NULL links in: 1) Single Linked List 2) Doubly Linked list 3) Circular Linked List 4) None 28) What is the equivalent postfix expression for the infix expression a + b*c-d? 1) b * c + a -d 2) a b c *+d3) (b*c) + a –d 4) a+(b*c) – d 29) Entries in the stack are “ordered”. What is the meaning of this statement? 1) A collection of stacks can be stored. Shree H.N.Shukla College of I.T & Management ”Sky is the Limit” 6 SHREE H. N. SHUKLA COLLEGE OF I.T. & MGMT. (AFFILIATED TO SAURASHTRA UNIVERSITY) 2 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot – 360001 Ph.No–(0281)2440478,2472590 3 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot - 360001 Ph.No–(0281) 2471645 2) Stack entries may be compared with ‘<’ operation. 3) The entries must be stored in linked list. 4) There is a first entry, second entry, and so on. 30) Input restricted deque is which type of queue? 1) Circular Queue 2) Static Queue 3) Dynamic Queue 4) Double Ended Queue 31) atoi() does…………….. 1) Convert character to string. 3) convert string to integer 2) Convert integer to string 4) convert string to character. 32) getw() is used to………… 1) read the integer values 3) read the string values 2) read the character values. 4) None 33) Which of the following function does not fall in random access category? 1) ftell() 2) fseek() 3) rewind() 4) fread() 34) What is the fullform of deque? 1) double queue 2) circular queue 3) double ended queue 4) None 35) The information part of header node contains………….information. 1) any data 2) total no. of nodes 3) Both 4) None 36) The situation when in a linked list START=NULL is………….. 1) underflow 2) Overflow 3) saturated 4) None 37) When new data are to be inserted into data structure, but there is no available space, the situation is usually called………. Shree H.N.Shukla College of I.T & Management ”Sky is the Limit” 7 SHREE H. N. SHUKLA COLLEGE OF I.T. & MGMT. (AFFILIATED TO SAURASHTRA UNIVERSITY) 2 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot – 360001 Ph.No–(0281)2440478,2472590 3 – Vaishalinagar Nr. Amrapali Railway Fatak Raiya Road Rajkot - 360001 Ph.No–(0281) 2471645 1) underflow 2) Overflow 3) Saturated 38)Root node in the tree has in-degree………….. 1) 1 2) 0 3) 2 4) None 39) A leaf node has no children 1) True 2) false 3) None 4) None 4) Both 40) In a balance binary tree, the height of two sub trees of every node can not differ by more than………. 1) 2 2) 1 3) 3 4) 0 Shree H.N.Shukla College of I.T & Management ”Sky is the Limit” 8
© Copyright 2026 Paperzz