Delete Function
| 105 | |
| 106 | //Delete Function |
| 107 | void 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 |
| 125 | void LinearSearch(struct array *arr,int key) |