We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
not No. (IAI TIV IOI 16) Paper Code: TES 302
‘Mid Semester Examination 2022
B.Tech (CSE) II Semester
Data Structure with ‘C’ language.
Time: 1:30 Hrs MM: 50
INSTRUCTIONS TO STUDENTS.
Note:
(i) This question paper contains five questions with alternative choice.
(Gi) All questions are compulsory.
Gii)Each question carries two parts a or b. Attempt either parts a or b of each
question.
(iv) Total marks assigned to each question are ten.
Qu. .
8) Assume that you have a double linked lis, first node of the list is pointed by pointer
Q, write a C function to insert a node after the last node of the list. (19)
Q
I — [ 3 tor fe Lt 8 Lt 4
oR
) Write a C function to insert a node at the right hand in a double linked list. (ao
Q.
1) Consider the following circular linked list, first node of the linked list is pointed by a
pointer P, Write a C function to print the list in the following order i.e.50, 30, 35, 40, 45.
Efe a ee 30
L
oR
b) Write a C function to implement pop function of the Stack, using linked list. ao)
a@.
a)Assume that you have a singly linked list. First node is pointed by pointer Ptr. Write a C
function to delete second last node of the linked list ao)
|_s
Ru is >| 20 of 35 4/40
Tt
oR,
byAssume that you have two singly linked lists. First node of the first linked list is pointed by
pointer Pirt and First node of the second linked list is pointed by pointer Ptr2. Write aC
function to print all the nodes having common information in both the linked lists (10)
(Sample Input /Output).
Input
mf [3s | 4s 47 {9 a
pal | tf 2 tol 3 4tw7 tf 10 cat
Output: 13,7
a.
3) Assume that we have a singly linked list with a pointer P at first node. Write C funetion
to print nodes of the linked list in alternate order. (10)
oR
b) Write C function to.print the node in reverse order of a Stack (implemented using linked
list. from bottom to top ,do not use array). 10)
Q.
1) Assume that you have a single linked list with a pointer P, at first node Write
‘aC function to input a number and search it in the linked list if number is
found , insert a new node after that node in the linked list. (10)
% OR
») Asstume that we have a single linked list with a pointer P at first node. Write C function to
‘count total nodes having odd information in the linked list (10)