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

Function deletion

Arrays/32_Operations_on_arrays.c:164–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164int deletion()
165{
166 int index;
167insertDeleteCheckpoint:
168 printf("Enter the index of the element you want to delete\n");
169 scanf("%d", &index);
170 if (index >= 0 && index <= a1.counter)
171 {
172 for (int i = index; i <= a1.counter; i++)
173 {
174 a1.array1[i] = a1.array1[i + 1];
175 }
176 a1.counter--;
177 printArr();
178 }
179 else
180 {
181 printf("Index out of range\n");
182 goto insertDeleteCheckpoint;
183 }
184}
185
186int traversing()
187{

Callers 1

mainFunction · 0.85

Calls 1

printArrFunction · 0.70

Tested by

no test coverage detected