MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / Delete

Function Delete

Arrays/31_Menu_for_Array.c:107–122  ·  view source on GitHub ↗

Delete Function

Source from the content-addressed store, hash-verified

105
106//Delete Function
107void Delete(struct array *arr,int index)
108{
109 int i;
110 if(index>=0 && index<=arr->length)
111 {
112 for(i=index;i<arr->length;i++)
113 {
114 arr->A[i]=arr->A[i+1];
115 }
116 arr->length--;
117 }
118 else
119 {
120 printf("You can delete the element due to invalid \n");
121 }
122}
123
124//LinearSearch Normal Method Funtion
125void LinearSearch(struct array *arr,int key)

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected