#include <stdio.
h>
#include <conio.h>
int main() {
int a[5], n = 0, loc, i;
printf("\n Enter how many elements you want to store in the array\n");
scanf("%d", &n);
printf("\n Enter your elements\n");
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
printf("\n Your elements are:\n");
for (i = 0; i < n; i++) {
printf("\n%d", a[i]);
printf("\n Deletion operation:\n");
printf("\n Enter the location where you want to delete element\n");
scanf("%d", &loc);
if (loc >= n + 1) {
printf("\n Deletion not possible\n");
} else {
for (i = loc - 1; i < n - 1; i++) {
a[i] = a[i + 1];
n--; // Reduce the size of the array as we deleted one element
printf("\n Array after deletion operation:\n");
for (i = 0; i < n; i++) {
printf("\n%d", a[i]);
getch();