Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to delete an item from a particular location
of an linear array?

Answer Posted / ajith.s uit adoor(2008-2011)

#include<stdio.h>
#include<conio.h>
void main()
{

int i,j,item,n,a[10],u,k;clrscr();

printf("enter the limit\n");
scanf("%d",&n);
if(n>=10)
{
printf("Array exceed limit .correct the limit value below
10 \n");
}
else
{

printf("enter the position\n");
scanf("%d",&k);
if(k<=n||k<=10)
{
printf("enter the terms\n");
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
}
printf("inserted list\n");
for(i=1;i<=n;i++)
{
printf("%d\n",a[i]);
}
printf("inser list\n");

for(i=k;i<=n-1;i++)
{
a[i] =a[i+1];

}
for(i=1;i<n;i++)
{
printf("%d\n",a[i]);
}
}
else
{
printf("postion given in below limit not equal to \n");
}
}
getch();
}

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you print only part of a string?

974


Explain is it valid to address one element beyond the end of an array?

1156


What is a good way to implement complex numbers in c?

1004


write a program to copy the string using switch case?

2850


Mention four important string handling functions in c languages .

1054


What are the usage of pointer in c?

1139


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

994


Why do we use main function?

1120


How can I convert a number to a string?

1101


Explain what is wrong with this program statement? Void = 10;

1202


What is pointer to pointer in c language?

1062


How can I remove the leading spaces from a string?

1100


What is main () in c?

1023


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3265


Describe the header file and its usage in c programming?

1025