#include<stdio.h>
int main() { 

 int arr[] = {12, 45, 1, 78, 32, 65}; 

 int n = sizeof(arr) / sizeof(arr[0]); 

 int target = 78; 
    
    int position = -1; 

 for (int i = 0; i < n; i++) { 

 if (arr[i] == target) { 

 position = i;

 break; 

 } 

 } 

 if (position != -1) { 
 printf("Element %d found at index %d\n", target, position);

 } else { 

 printf("Element %d not found in the array\n", target); 

 } 

 return 0; 

}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: