DSA Lab Exercise 3
DSA Lab Exercise 3
b. c.
a.
2. Write a C++ program that accepts 10 integers from the user and finally displays the
smallest value and the largest value.
3. Given an integer array nums, display ‘true’ if any value appears at least twice in the
array, and display ‘false’ if every element is distinct.
4. Write a program which takes 2 arrays of 4 integers each, a and b. c is an array with 8
integers. The program should put into c the first 4 integers of c from array a, the latter
4 from b. Then the program should display c.
5. You are given an array with the following elements 5, 12, 25, 31, 15, 6, 31, 8, 21 and a
target element 8. Return the index of the target in the array after sorting it in increasing
order.