Practical 2 B
Practical 2 B
h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
printf("\nEnter Array:\n");
for (i = 0; i < n; i++) {
scanf("%d", &val[i]);
}
if (found) {
printf("\nElement %d found in the sorted array.\n", ele);
} else {
printf("\nElement %d not found in the sorted array.\n", ele);
}
return 0;
}