From 2b3c3deb37fb93003c0c6edf928c098822be99e6 Mon Sep 17 00:00:00 2001 From: RaunakJain21 <104013684+RaunakJain21@users.noreply.github.com> Date: Sun, 9 Oct 2022 02:00:31 +0530 Subject: [PATCH 1/2] Add files via upload --- insertion in array.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 insertion in array.c diff --git a/insertion in array.c b/insertion in array.c new file mode 100644 index 0000000..94a7161 --- /dev/null +++ b/insertion in array.c @@ -0,0 +1,25 @@ +#include + +int main() +{ + int n; + printf("Enter the size of array\n"); + scanf("%d",&n); + int a[n],i,b,pos; + printf("Enter the elements of array\n"); + for(i=0;i=pos;i--) + { + a[i]=a[i-1]; + } + a[pos-1]=b; + printf("Now the array is\n"); + for(i=0;i<=n;i++) + printf("%d ",a[i]); + return 0; +} \ No newline at end of file From 6f4ba42ca2606e8805b2aad5b5786e6c6485d151 Mon Sep 17 00:00:00 2001 From: RaunakJain21 <104013684+RaunakJain21@users.noreply.github.com> Date: Sun, 9 Oct 2022 02:19:24 +0530 Subject: [PATCH 2/2] Add files via upload --- deletion in array.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 deletion in array.c diff --git a/deletion in array.c b/deletion in array.c new file mode 100644 index 0000000..7d45653 --- /dev/null +++ b/deletion in array.c @@ -0,0 +1,35 @@ +#include + +int main() +{ + int n; + printf("Enter the size of array\n"); + scanf("%d",&n); + int a[n],i,b,j,d=0; + printf("Enter the elements of array\n"); + for(i=0;i