write a program to delete an item from a particular location
of an linear array?
Answer / 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 |
Is a house a shell structure?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What is void c?
Why do we need arrays in c?
What is the symbol indicated the c-preprocessor?
What is the default value of local and global variables in c?
#include<stdio.h> void main() { int =1; printf("%d%d%d",a++,++a,++a); }
What are the application of void data type in c?
What is the difference between fread buffer() and fwrite buffer()?
What is FIFO?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
what is the output of the following program? #include<stdio.h> void main() { float x=1.1; while(x==1.1) { printf("\n%f",x); x=x-0.1; } }