0% found this document useful (0 votes)
20 views

Cs-08 Data Structure Using c Language

This document is an examination paper for the Bachelor of Computer Application program, specifically for the Data Structure using C Language course. It includes various questions on topics such as algorithm efficiency, sorting algorithms, searching techniques, data structures, and tree traversal methods. The exam consists of fill-in-the-blank questions, explanations, comparisons, and algorithm writing tasks, totaling 50 marks.

Uploaded by

jatinchauhan6560
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Cs-08 Data Structure Using c Language

This document is an examination paper for the Bachelor of Computer Application program, specifically for the Data Structure using C Language course. It includes various questions on topics such as algorithm efficiency, sorting algorithms, searching techniques, data structures, and tree traversal methods. The exam consists of fill-in-the-blank questions, explanations, comparisons, and algorithm writing tasks, totaling 50 marks.

Uploaded by

jatinchauhan6560
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

23SI-BCAP-MA-02-03001

Seat No.
_______

BACHELOR OF COMPUTER APPLICATION Examination


BCA Semester - 2 JUNE 2024 ( NEP ) JUNE - 2024
CS-08: DATA STRUCTURE USING C LANGUAGE
JAM010156524

JAM010156524

JAM010156524
Faculty Code : 003
Subject Code : 23SI-BCAP-MA-02-03001

Time : 2 Hours] [Total Marks : 50

Q.1 (A) Fill in the Blanks: 3


(1) ________ and _____ are two main measures of the efficiency of an algorithm.
(2) The ____________ function in C programming language is used to deallocate
memory.
(3) Malloc function returns ____________ .
JAM010156524

JAM010156524

JAM010156524
Q.1 (B) What is Big-Oh notation? Provide a brief explanation. 2
Q.1 (C) Compare and contrast Big-Oh and Big-Omega notations in algorithm analysis. 5
OR

Q.1 (A) Fill in the Blanks: 3


(1) ____________ function is used to open a file in C.
(2) ____________ is the return type of the fopen() function in C.
(3) _________ function is used to close a file in C.
Q.1 (B) Explain the purpose of the fopen() function in file handling. 2
Q.1 (C) How does feof() function work in file handling? Give an example. 5

Q.2 (A) Fill in the blanks: 3


JAM010156524

JAM010156524

JAM010156524

(1) The time complexity of Bubble Sort is _______ .


(2) _______________ sorting algorithm is based on the idea of repeatedly dividing
the list into smaller sublists and then sorting those sublists.
(3) In ___________ Sort, elements are compared and swapped in one direction.
Q.2 (B) Explain the basic principle behind Bubble Sort and its time complexity. 2
Q.2 (C) Discuss the advantages and disadvantages of using Quick Sort over Merge Sort 5
forsorting large datasets.
OR
Q.2 (A) Fill in the blanks: 3
(1) Binary Search can only be applied to a _______ list.
(2) _______________ searching technique checks each element in the list one by
one until the desired element is found.
(3) The time complexity of Binary Search is ________ .
Q.2 (B) Describe the process of Binary Search. Also, mention its time complexity. 2
Q.2 (C) Differentiate between Index Searching and Sequential Searching. When is 5
eachmethod preferred?
1
Q.3 (A) Fill in the blanks: 3
(1) The data structure used to evaluate postfix expressions is called _______.
(2) In the context of data structures, the acronym FIFO stands for _______.
(3) The process of removing an element from a stack is commonly referred to
as_______.
Q.3 (B) Differentiate stack and queue. 2
Q.3 (C) Write a note on the circular queue. 5
JAM010156524

JAM010156524

JAM010156524
OR
Q.3 (A) Fill in the blanks: 3
(1) The primary purpose of a deque is to allow insertion and deletion from
both_______.
(2) The function used to insert an element into a queue is called _______.
(3) Recursion in data structures can be implemented using _______.
Q.3 (B) Write down applications of stack and queue. 2
Q.3 (C) Write a note on deque. 5

Q.4 (A) Fill in the blanks: 3


(1) In a singly linked list, each node contains a reference to the ________ node in
the sequence.
JAM010156524

JAM010156524

JAM010156524
(2) Traversing the entire linked list involves starting from the ________ node and
moving to each subsequent node until reaching the end.
(3) To insert a node after a specified node in a singly linked list, you need to update
the ________ reference of the preceding node.
Q.4 (B) Differentiate Singly and Doubly Linked List. 2
Q.4 (C) Write an algorithm to insert new node in the beginning of the singly linked list. 5
OR
Q.4 (A) Fill in the blanks: 3
(1) In a doubly linked list, each node contains references to both the ________
and________ nodes.
(2) Circular linked lists are characterized by the last node pointing back to
the________ node, creating a loop.
JAM010156524

JAM010156524

JAM010156524

(3) Traversing a header linked list involves starting from the ________ node and
moving to each subsequent node until reaching the end.
Q.4 (B) Write down applications of the linked list. 2
Q.4 (C) Write an algorithm to delete last node from singly linked list. 5

Q.5 (A) Fill in the blanks: 3


(1) A binary tree is a tree in which each node has at most ________ children.
(2) The process of visiting all the nodes in a tree data structure, exactly once, in a
specific order is called ____________.
(3) In tree ____ node has no children.
Q.5 (B) Define a binary tree and mention two properties of binary trees. 2
Q.5 (C) Describe the implementation of in-order, pre-order, and post-order traversals of 5
abinary tree. Write an algorithm for any one of the traversals.
OR
Q.5 (A) Fill in the blanks: 3
(1) In-order traversal of a binary tree first visits the ________ child, then the root,
2
and finally the ________ child.
(2) Pre-order traversal of a binary tree first visits the root, then the ________ child,
and finally the ________ child.
(3) Post-order traversal of a binary tree first visits the ________ child, then
the________ child, and finally the root.
Q.5 (B) Explain the concept of graph traversal. Differentiate between depth-first 2
search(DFS) and breadth-first search (BFS).
JAM010156524

JAM010156524

JAM010156524
Q.5 (C) Briefly explain the concept of a minimal spanning tree in a graph. 5
JAM010156524

JAM010156524

JAM010156524
JAM010156524

JAM010156524

JAM010156524

You might also like