1. Searching an Array
Write a C program to search for an element ‘a’ in the array. (Linear Search)
Input Format:
Input consists of n+2 integers. The first integer corresponds to ‘n’ , the size of the array. The next ‘n’ integers correspond to the elements in the array. The last integer corresponds to ‘a’, the element to be searched.
Assume that the maximum size of the array is 20.
Assume that the maximum size of the array is 20.
Output Format:
Refer sample output for details.
code:
No comments:
Post a Comment