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

Function lShift

Arrays/31_Menu_for_Array.c:340–352  ·  view source on GitHub ↗

Left Shift Function

Source from the content-addressed store, hash-verified

338
339//Left Shift Function
340void lShift(struct array *arr)
341{
342 int i;
343 for(i=0;i<arr->length-1;i++)
344 {
345 arr->A[i]=arr->A[i+1];
346 }
347 printf("\nThe elements in the array after left shift are: \n");
348 for(i=0;i<arr->length-1;i++)
349 {
350 printf("%d ",arr->A[i]);
351 }
352}
353
354//Right Shift Function
355void rShift(struct array *arr)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected