function to perform right shift
void rightShift ( int ac [ ] , int qr [ ] , int & qn , int qrn ) { int temp , i ; temp = ac [ 0 ] ; qn = qr [ 0 ] ; cout << " TABSYMBOL TABSYMBOL rightShift TABSYMBOL " ; for ( i = 0 ; i < qrn - 1 ; i ++ ) { ac [ i ] = ac [ i + 1 ] ; qr [ i ] = qr [ i + 1 ] ; } qr [ qrn - 1 ] = temp ; }