C program to find the position of an element in an array
Answers
Answered by
4
Linear search C program. #include <stdio.h> int main() { int array[100], search, c, n; printf("Enter number of elements in array\n"); scanf("%d", &n); printf("Enter %d integer(s)\n", n); for (c = 0; c < n; c++)
Answered by
0
Explanation:
PROGRAM:
#include <stdio. h>
int main()
{
//Initialize array.
int arr[] = {1, 2, 3, 4, 5};
//Calculate length of array arr.
int length = sizeof(arr)/sizeof(arr[0]);
printf("Elements of given array present on even position: \n");
Similar questions