Q1.Write following C Programs
a) to store N elements to an array and then send all positiveelements of the array to
the end without alteringthe original sequence.
b).Write a C program to Insert and Delete elements form aQueue using link list ,each node
should have thefollowing inforamaion about a product Product_Id(char) ,Product_Name(string) ,
Total_sale(integer),Product_Grade(Char)
c). Write a C program to find union (of two linked lists) basedon their information field
that implementssingly linked list (with information field Emp_Id and Name ofemployee for each node ).
Qd). Write a C program to create two link lists positive andnegative from a Original linked list, so that
positive linked listcontains all positive elements and negative linked listcontains negative elements.
Positive and negativelinked lists should use the node of existing original linkedlist.
e). Write a C program to create a linkedlist P, then write a ‘C’ function namedsplit to create two
linkedlists Q & R from P So that Q contains all elementsin odd positions of P and R contains the
remaining elements. Finally print both linked listsi.e. Q and R.
f). W.A.P. to create a binary search tree and perform followingoperations:
1) Search aparticular key.
2) Delete anode from the tree.
3) Find totalnumber of leaf nodes
4) Find heightof a binary search tree
5) Count totalnumbers of nodes from right hand side of root node
Output of the programs are also required.
Q1.Write following C Programs a) to store N elements to an array and then send all positive elements of the array to the
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am