// deleting a value of an array
#include<stdio.h>

int main(){
    int n,i,p;
    printf("Enter length of array : ");
    scanf("%d",&n);
    int a[n];
    printf("\nEnter elements of the array : ");
    for(i=0;i<n;i++){
        scanf("%d ",&a[i]);
    }
    printf("\nEntered array is : ");
    for(i=0;i<n;i++){
        printf("%d ",a[i]);
    }
    printf("\nEnter the position you want to delete : ");
    scanf("%d",&p);
    printf("\nPosition : %d",p);
    for(i=p ; i<n ; i++){
        a[i]=a[i+1];
    }
    printf("\nUpdated array is : ");
    for(i=0;i<(n-1);i++){
        printf("%d ",a[i]);
    }
    
    
}

Embed on website

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