Computer Science A - rotate - 9/9/99 Directions: Write a function that rotates a vector S with N elements so that when the rotation is completed, the old value of S[0] will be in S[1] and the old value of S[1] will be in S[2],..., the old value of S[N-2], will be in S[N-1], and the old value of S[N-1] will be in S[0]. Assume the vector is full. Sample vector before call: 5 8 1 9 0 4 Sample vector after executing function: 4 5 8 1 9 0 Declarations: const int N = ; apvector S(N); Prototype: Void rotate(apvector& S, int N); Code: Void rotate(apvector& S, int N); { int temp = S[N-1]; for(int lcv = N - 1; lcv >= 1; lcv--) S[lcv] = S[lcv - 1]; S[0] = temp; }