Implement a program to perform a linear search on an array.
MediumProblem Statement
Implement a program to perform a linear search on an array.
Sample Input
int arr[] = {2, 4, 6, 8, 10}; and int key = 6;Sample Output
Element found at index: 2
Limits
Time: 2s · Memory: 256 MB