Implementation of Array Operations Using Functions and Loops
Implementation of Array Operations Using Functions and Loops
h>
#include <stdlib.h>
#include <string.h>
struct array{
int choice;
char g=’y’;
}arr;
void create();
void insert();
void deletion();
void search();
void update();
void display();
int a[100];
int element,i,loc,size,n,j,key,pos;
int main()
{
// clrscr();
j = j + 1;
}
printf("\nElement %d is found at %d position", key, j+1);
}
void update()
{
printf("List before updation\n");
for(i=0;i<size;i++)
{
printf("%d ",a[i]);
}
printf("\nEnter an element to be updated\n");
scanf("%d",&key);
printf("\nEnter an position to be updated\n");
scanf("%d",&pos);
a[pos-1] = key;
printf("\nArray elements after updation :\n");