C and Data Structure
C and Data Structure
1. WAP to check whether the values given by the user forms a Magic square or not. (A
magic square is one whose sum of all the rows, all the columns and the diagonals are
equal).
11.Develop a function ConcatReverse (s1, s2) which concatenate the reverse of string s2
into s1.
Linked Lists
1. WAP that will create a singly linked list of integers and display the items.
2. WAP that will create a singly linked list of integers and display the items. Design a
menu driven program that will perform the following tasks
3. WAP that will create a singly linked list of integers and display the items. Design a
menu driven program that will perform the following tasks
iii) Delete an item from any where in between the terminal nodes
4. WAP that will create two singly linked lists and then merge them into a singly list
where
7. WAP that will remove the redundant nodes in a singly linked list.
8. WAP that will create a list by selecting the alternate items of a given list
9. WAP that will create a list by selecting the items alternatively from two singly linked
lists.
10.WAP that will count the non-zero elements, odd elements and even elements of a
singly linked list.
13.WAP that will display the elements of a linked list by traversing the nodes spirally.
E.g. if a given linked list is 12 14 16 18 20 25 the spiral display will be 12
25 14 20 16 18.
14.WAP that will create a doubly linked list of integers and display the items in both
forward and backward direction.
15.WAP that will create a doubly linked list of integers and display the items. Design a
menu driven program that will perform the following tasks
16.WAP that will create a doubly linked list of integers and display the items. Design a
menu driven program that will perform the following tasks
Data Structures using C
vi) Delete an item from any where in between the terminal nodes
17.WAP that will create two Doubly linked lists and then merge them into a singly list
where
1. WAP that will create a sparse matrix by taking integer elements from the user and
then display both the sparse matrix and transpose of the sparse matrix.
2. WAP that will create two sparse matrices by taking integer elements from the user
and then add them. Also display each of the matrices.
3. WAP that will create two sparse matrices by taking integer elements from the user
and then add them by using linked lists. Also display each of the matrices.
1. WAP to implement stack operations like push, pop and display using array.
2. WAP to implement stack operations like push, pop and display using linked list.
9. WAP that will implement the queue operations like insert, delete and display using
array.
10.WAP that will implement the queue operations like insert, delete and display using
linked list.
12.WAP that will implement the circular queue operations like insert, delete and display
using array.
13.WAP that will implement the circular queue operations like insert, delete and display
using linked list.
5. WAP to sort the elements of an array using Merge sort without using recursion.
6. WAP to sort the elements of an array using Merge sort with using recursion.