0% found this document useful (0 votes)
34 views2 pages

Lab4 Array Soting

The document outlines the tasks for Lab 4 which involve writing C++ programs to accept and display array elements, then sort the arrays using various sorting methods including bubble sort, exchange sort, selection sort, insertion sort, quick sort, merge sort, and shell sort. Students are instructed to create programs with the ability to accept an array from the user, display the array elements, then sort the array using one of the specified sorting methods for each program.

Uploaded by

Tayyab Jutt
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)
34 views2 pages

Lab4 Array Soting

The document outlines the tasks for Lab 4 which involve writing C++ programs to accept and display array elements, then sort the arrays using various sorting methods including bubble sort, exchange sort, selection sort, insertion sort, quick sort, merge sort, and shell sort. Students are instructed to create programs with the ability to accept an array from the user, display the array elements, then sort the array using one of the specified sorting methods for each program.

Uploaded by

Tayyab Jutt
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

Data Structures and Algorithm # Lab 4

University of Engineering and Technology


Taxila-Electrical Engineering Department

LAB # 4: Array Searching & sorting Methods

Task #1: Write a C++ program with following option


a. Accept elements of an array from user
b. Display elements of an array
c. Sort the array using Bubble sort method

Task #2: Write a C++ program with following option


a. Accept elements of an array from user
b. Display elements of an array
c. Sort the array using exchange sort method

Task # 3: Write a C++ program with following option


a. Accept elements of an array from user
b. Display elements of an array
c. Sort the array using selection sort method
Data Structures and Algorithm # Lab 4

Task # 4: Write a C++ program with following option


a. Accept elements of an array from user
b. Display elements of an array
c. Sort the array using insertion sort method

Task # 5: Write a C++ program with following option


a. Accept elements of an array from user
b. Display elements of an array
c. Sort the array using Quick sort method

Task # 6: Write a C++ program with following option


a. Accept elements of an array from user
b. Display elements of an array
c. Sort the array using Merge sort method

Task # 7: Write a C++ program with following option


a. Accept elements of an array from user
b. Display elements of an array
c. Sort the array using Shell sort method

You might also like