Write a program that will search and find out the position where the given key element exist in a user chosen array and print it as output.
C Programming Language Array in C Language (Article) Array in C Language (Program)
1003Program:
#include #include int main() { int a[30],n,i,key, FOUND=0; printf("\n How many numbers "); scanf("%d",&n); if(n>30) { printf("\n Too many Numbers"); exit(0); } printf("\n Enter the array elements \n"); for(i=0 ; i
Output:
How many numbers 5 Enter the array elements 5 4 3 2 1 Enter the key to be searched 3 Found at 2
Explanation:
None
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.