Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Insertion , Deletion and treversing operation in array in c language (DSA), Assignments of Computer Science

How can we trevers the array's element and how can we insert or delete the the elements in array. We can insert or delete the elements in array at first, middle or last position (means every position) .

Typology: Assignments

2020/2021

Uploaded on 10/08/2021

manish-panwar-1
manish-panwar-1 🇮🇳

1 document

1 / 5

Toggle sidebar

Related documents


Partial preview of the text

Download Insertion , Deletion and treversing operation in array in c language (DSA) and more Assignments Computer Science in PDF only on Docsity! Name :- Manish Panwar CS-AI 3rd semester Poornima University Jaipur /* Program to insertion , deletion , traversing of an array */ #include<stdio.h> int main() { int a[50],size,i,choice,pos,n; printf("Enter size of array : "); scanf("%d",&size); printf("Enter element of array \n"); for(i=0;i<size;i++) { scanf("%d",&ali]); printf("press 1 for insert a value of an array \n"); printf("press 2 for delete a value of an array \n"); printf("press 3 for traversing of an array \n"); printf("\nEnter your choice : "); scanf("%d",&choice); switch(choice) { case 1: printf("your aray is : \n"); for(i=0;i<size;i++) { printf("%d ",a[i]); } printf("\n\nEnter position that you want to insert element : "); scanf("%d",&pos); printf("Enter value that you want to insert : "); scanf("%d",&n); for(i=size;i>=pos;i--)