Professional Documents
Culture Documents
CODE
6. a. Write a function program to perform the following operations on a doubly linked list
i. Create a list
ii. Insert an element to the list
iii. Delete a specific element from the list
iv. Display the content of the list
v. Find the number of elements in the list. Write a main function to demonstrate the
above.
7. a. Write a C program to implement a Queue using Linked List to create a Queue, (60)
b. Write the routine for insert operation which represents a function enqueue(X) performed
at the end of the list, delete operation which represents a function dequeue(Q) performed
at the front of the list. Test your program with at least 5 elements and provide the output
(40)
11. a. Write a function program to perform the following operations on a singly linked list
i. Create a list
ii. Find the smallest element from the list
iii. Insert an element if it is not a duplicate element
iv. Display the elements in reverse order
12. a. Develop a ‘C’ program for evaluating postfix expression using array implementation of a
stack. (50)
b. Write a C program in C to print the Armstrong numbers upto 100. (50)
13. a. Write a program in C to implement Collision resolution in Hash table using linked list.
(70)
b. Write a program in C to find the factorial of the given number. (30)
14. a. Write a program in C to sort the following elements using Insertion Sort (60)
b. Write a program in C to perform matrix subtraction. (40)
15. a. Write a program in C to convert the following infix expression to its postfix form using
push and pop operations of a Stack
i) A/B^C+D*E-F*G
ii) (B^2-4*A*C)^(1/2) (100)
16. a. Write a program in C to evaluate the following expression using operations on a Stack
i) 234+*5*
ii) 4 5 + 7 2 - * (100)
18. a. Define a structure called student that will describe the following information:
Register Number
Student Name
Section Name
Average.
Using student, declare an array students with ‘N’ elements and develop a ‘C’ program to read
the information about all the ‘N’ students and print a section wise list containing names of
students with their average. (50)
b. Develop a ‘C’ program for implementing a stack using arrays. Illustrate the operations
that can be performed on the same. (50)
19. a. Develop a ‘C’ program to find the sum of the digits of a given number using while
statement. (40)
b. Develop a ‘C’ program to sort an array of ‘N’ numbers using merge sort. (60)
20. a. Develop a ‘C’ program using function to compute the factorial of a given number. (40)
b. Develop a ‘C’ program to sort an array of ‘N’ numbers using merge sort. (60)