You are on page 1of 3

Algorithms and Data Structures

Theory Assignment 1
BCE 7

Instructions:
Submission Date: 25 Sep 2014.
Submission Time: 12pm
Late submission will be Consider Zero Marks.
1. Find the Maximum and Minimum number in an array using pointers.
2. Program to implement a 1-D array the following operation.

Take an Array input from user


Inserts an element number at given position pos
Deletes an element from the given position pos
Reverses the entire array
Searches in array for a given element number
Displays the contents of a array
Out Put Of Your Program Should Like This

/****************** OUTPUT ******************************


****** MENU *********
1. Read Array
2. Display
3. Traverse Backward
4. Insert
5. Delete
6. Search
7. Exit
Enter your choice1
Enter size of array 5
2 1 5 3 7
Do you want to continue? [Y->1/N->0]1
****** MENU *********
1. Read Array
2. Display
3. Traverse Backward
4. Insert
5. Delete
6. Search
7. Exit
Enter your choice 2
2
1
5

Do you want to continue? [Y->1/N->0]1

****** MENU *********


1. Read Array
2. Display
3. Traverse Backward
4. Insert
5. Delete
6. Search
7. Exit
Enter your choice3
7
3
5

Do you want to continue? [Y->1/N->0]1


****** MENU *********
1. Read Array
2. Display
3. Traverse Backward
4. Insert
5. Delete
6. Search
7. Exit
Enter your choice4
2
1
66

Do you want to continue? [Y->1/N->0]1


****** MENU *********
1. Read Array
2. Display
3. Traverse Backward
4. Insert
5. Delete
6. Search
7. Exit
Enter your choice5
2

Do you want to continue? [Y->1/N->0]1


****** MENU *********
1. Read Array
2. Display
3. Traverse Backward
4. Insert
5. Delete
6. Search
7. Exit

3. Write a Program to merge two 1-D arrays


4. Develop a program for matrix operations like dertminant, singular, and transpose of a
matrix etc. Using Class and object approach.
5. Develop a program to find the norm of a matrix. The norm is defined as the square root of
the sum of squares of all elements in the matrix. Using Class and object approach

You might also like