Friday, May 17, 2019

Program to perform Insertion and Deletion operation on an Linear Queue in C Data Structures

For many other Language  Programs related to microprocessor 8086, data structures  and C++ visit our  BLOG


#include<stdio.h>
#include<conio.h>
void main()
{
int arr[10] ,p ,I ,n ,val ;
printf(“enter elements”);
for(i=0;i<10;i++)
{
scanf(“%d”,&arr[i]);
}
printf(“enter position to delete number”);
scanf(“%d”,&p);
if(p >10)
{
printf(“deletion not possible ”);
}
else
{
for(i=p;i<10;i++)
{
arr[i] = arr[i+1];
}
printf(“\n\nresult after deletion ”);
for(i=0;i<10-1;i++)
printf(“\n%d”,arr[i]);
}

Programs:-

For many other Language  Programs related to microprocessor 8086 visit our  BLOG 

There are programs of bubble , selection , linear search , pop, push ,etc for data structures

No comments:

Post a Comment