0% found this document useful (0 votes)
70 views1 page

DSA Assignment 2

This lab assignment asks students to complete various tasks involving arrays and pointers in C programming. Students will write programs to search arrays, find minimum and maximum elements, insert and delete elements at any location, perform array operations like addition and subtraction, and sort merged arrays. The programs must use functions and call arrays by address to complete tasks like linear search, finding the second minimum/maximum, and insertion/deletion at any index.

Uploaded by

gjharwalbe20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views1 page

DSA Assignment 2

This lab assignment asks students to complete various tasks involving arrays and pointers in C programming. Students will write programs to search arrays, find minimum and maximum elements, insert and delete elements at any location, perform array operations like addition and subtraction, and sort merged arrays. The programs must use functions and call arrays by address to complete tasks like linear search, finding the second minimum/maximum, and insertion/deletion at any index.

Uploaded by

gjharwalbe20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

LAB ASSIGNMENT 2

ARRAYS AND POINTERS

Objectives: Students should be able to perform various operations on array data structures.
To explain the intimate relationship between arrays and pointers ( along with pointer
arithmetics).

1. Write a program to check whether a given number is present in array or not (Linear search).

2. Write a program to get second maximum and second minimum elements in an array.

3. Write a program to perform insertion (any location), deletion (any location) and traversal in
an array.

4. Write a menu driven program to perform addition, multiplication and substraction of 2


arrays.

5. Write a program to perform sorting while merging (Merge two sorted arrays into one sorted
array).

6. Write the above programs (1,2, and 3) using functions and call by address only.

You might also like