C Write a function Stack downRotateStack s which returns the

C++
Write a function Stack downRotate(Stack s) which returns the down-rotation of a stack (the top node is moved to the bottom).

Solution

int main(){

    int a,b,c;

    cout<<\"Enter a: \";

    cin>>a;

    cout<<\"Enter b: \";

    cin>>b;

    cout<<\"Enter c: \";

    cin>>c;

    int temp;

int *aPtr = &a, *bPtr = &b, *cPtr = &c;

int *tempPtr = &temp;

*tempPtr = *cPtr;

*cPtr = *bPtr;

*bPtr = *aPtr;

*aPtr = *tempPtr;

    system(\"pause\");

    return 0;

}

C++ Write a function Stack downRotate(Stack s) which returns the down-rotation of a stack (the top node is moved to the bottom).Solutionint main(){ int a,b,c; c

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site