Friday, 19 August 2016

printf("\nEnter the size of the array elements:\t");scanf("%d",&n);
printf("\nEnter the elements for the array:\n");for(i=0;i<n;i++){scanf("%d",&a[i]);}
printf("\nEnter the position of the element to be deleted:\t");scanf("%d",&pos);val=a[pos];for(i=pos;i<n-1;i++){a[i]=a[i+1];}n=n-1;printf("\nThe deleted element is =%d",val);printf("\nThe array elements are:\n");for(i=0;i<n;i++){ printf("%d\t",a[i]); }
getch();
}