answersLogoWhite

0

#include

#include

int main()

{

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

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 inserted element");

scanf("%d",&item);

printf("enter the position\n");

scanf("%d",&k);

if(k<=nk<=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");

j=n;

while(j>=k)

{

a[j+1] =a[j];

j=j-1;

}

a[k]=item;

for(i=1;i<=n+1;i++)

{

printf("%d\n",a[i]);

}

}

else

{

printf("postion given in below limit not equal to \n");

}

}

getch();

return 0;

}

// program by choudhary yogesh malik

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How do you delete unsorted bookmarks?

Sometimes, it is important to clear out sites that are not being used. To delete bookmarks, one right clicks, and chooses delete from the drop down menu.


Is it possible to delete the element randomly in queue?

No,it's not possible to delete the element randomly


How can you delete a program that wont delete?

One should not delete a program,programs can never be deleted they should always be uninstalled.Deleting a program can never help because if you delete a program u will not see it there but it is used by the computer or system.When you uninstall a program it is totally removed from the computer and is never used again unless u install it.


Program in c to delete an element in sorted array?

You cannot delete elements from an array. But you can move the elements: if (del_index &lt; no_of_elements-1) { memmove (&amp;array [del_index], &amp;array [del_index+1], sizeof (array [0]) * (no_of_elements - del_index - 1)); } --no_of_elements;


Delete an element from an options array?

Set it to null


Common operation of singly linked list?

Common operations on a singly linked list include insertion (at the beginning, end, or specific position), deletion (from the beginning, end, or specific position), traversal (visiting each node in the list), searching (finding a specific value), and updating (modifying the value of a node).


How do delete books from the sony app on the computer?

go into the program files and delete system 32


How can you uninstall a program from control panel after you delete it from program files?

add or remove programs


How do you delete the aim program?

that's quite easy, just go to the website &amp; click delete account !


How can delete unnecessary files from windows?

By going to the 'add &amp; delete program' file under control panel


Crossfire game not working?

to fix this, simply delete the Crossfire program files, then reinstall. (go to c: then open 'program files', now look for "z8" and delete it.)


An algorithm of deleting linked list?

To delete a linked list walk through the list and delete the memory allocated to each element, remembering the next element address, and then iterating or recursing the process using the next element address, until the next element address is null.