Program to search for a given number in an array using C

/*WAP to search for a given number in an array*/ #include<stdio.h> #include<stdlib.h> void main() { int a[20],i,n,s; clrscr(); printf(“Input the size of an array-\n”); scanf(“%d”,&n); printf(“Enter %d elements-\n”,n); for(i=0;i<n;i++) scanf(“%d”,&a[i]); printf(“Input the number to search-\n”); scanf(“%d”,&s); for(i=0;i<n;i++) if(a[i]==s) { printf(“Number %d found at %d position\n”,s,i+1); exit(0); } printf(“Number %d is not found\n”,s); } Output Input … Read moreProgram to search for a given number in an array using C