Sie sind auf Seite 1von 2

Lab Assignments

1. To demonstrate the behavior of Bubble Sort.


2. To demonstrate the behavior of Selection Sort.
3. To demonstrate the behavior of Insertion Sort.
4. To demonstrate the behavior of Linear Search.
5. To demonstrate the behavior of Binary Search.
6. Find the sum of elements of an array.
7. Find the average of elements of an array.
8. Find the largest of the elements of an array.
9. Find the smallest of the elements of an array.
10. Find the range of the elements of an array.
11. Write a program that stores integer values in an array of 2 rows and 4
columns.
12. Write a program that initialize a two dimensional array of 2 rows and 3
columns and then displays its values.
13. Write a program that initialize a two dimensional array of 4 rows and 2
columns and then displays the minimum and maximum number in the
array.
14. Write a program to add two matrices (two dimensional arrays).Input
order of matrices (i.e. number of rows and columns).The matrices must
be of same size to be added Get the input for each element of the first
matrix and then second matrix. Add the two matrices and store the
values in a third matrix. Finally display all matrices.
15. Write a program that inputs number of rows and columns from the
user. It then inputs the elements to store in the matrix. The program
calculates the sum of each row and each column and displays on the
screen. If it is a square matrix, it also calculates the sum of diagonal
elements and display it on the screen.
16. To demonstrate the behavior of Stack Data Structure.
17. To demonstrate the behavior of Queue Data Structure.
18. To reverse a string.
19. To check the balance of equation.
20. To Convert an Infix notation into Postfix and evaluate it.
21. To Convert an Infix notation into Prefix and evaluate it.
22. Write a program that convert decimal into its corresponding binary
using stack.
23. Write a program that inputs 10 numbers in an array and counts all the
prime no. entered by the user. The program then finally display the total
no. of prime numbers in an array.
24. Write a program that uses two arrays to store roll# and marks of five
students and store them in corresponding element of array. The program
finally display the roll# and marks of the student with highest marks.

25. Write a program that uses four arrays to store numbers, square, cube
and sum of the corresponding indexes of these arrays the program
should display the sum array and total of all the values in sum array.
26. : Write a program that inputs the numbers and monthly salary of each.
If annual salary is>=250000 then return number salary and message
"tax to be paid" or no tax".
27. Write a program that inputs 10 integers in an array. It displays the
number of occurrence of each integer in the array.
28. Write a program that inputs marks of ten students. The program
displays no. of students in each grade.
29. To demonstrate the behavior of Linked List using Queue Data Structure.
30. To demonstrate the behavior of Linked List using Stack Data Structure.
31. To demonstrate the behavior of Circular Queue.
32. To demonstrate the behavior of Double Ended Queue.
33. To demonstrate the behavior of Prioritized Queue.

--------------------------------------------------------------

Das könnte Ihnen auch gefallen