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 |
What is meant by initialization and how we initialize a variable?
write a program to print data of 5 five students with structures?
explain what are pointers?
what is the c source code for the below output? 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1
How can you draw circles in C?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
Write a program to exchange two variaables without temp
how many key words availabel in c a) 28 b) 31 c) 32
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
code for replace tabs with equivalent number of blanks
How can I read in an object file and jump to locations in it?
Do you have any idea about the use of "auto" keyword?