String Manipulation/Lab6.c
void reverse(char *A){
    
    int sizeOfArray = strlen(A);
    char bufferHold[sizeOfArray];

    //copies the original array into a new array, backwards
    for(int i = 0, j = sizeOfArray - 1; i < sizeOfArray; i++, j--){
        bufferHold[i] = A[j];
    }
    
    //copies the now backwards array back into the original
    for(int i = 0; i < sizeOfArray; i++){
        A[i] = bufferHold[i];
    }
}
/*
    reverse: reverses the elements of an array
    input: the array to be reversed (A)
*/
reverses the elements of an array
input: the array to be reversed (A)
reverses the elements of an array input : the array to be reversed ( A )
void reverse(char *A){
    int sizeOfArray = strlen(A);
    char bufferHold[sizeOfArray];
    for(int i = 0, j = sizeOfArray - 1; i < sizeOfArray; i++, j--){
        bufferHold[i] = A[j];
    }
    for(int i = 0; i < sizeOfArray; i++){
        A[i] = bufferHold[i];
    }
}
void reverse ( char * A ) { int sizeOfArray = strlen ( A ) ; char bufferHold [ sizeOfArray ] ; for ( int i = 0 , j = sizeOfArray - 1 ; i < sizeOfArray ; i ++ , j -- ) { bufferHold [ i ] = A [ j ] ; } for ( int i = 0 ; i < sizeOfArray ; i ++ ) { A [ i ] = bufferHold [ i ] ; } }
reverse: reverses the elements of an array
input: the array to be reversed (A)
reverse : reverses the elements of an array input : the array to be reversed ( A )
//copies the original array into a new array, backwards //copies the now backwards array back into the original