Rotate an array by 2 places

I have an array a[]={0,1,2,3,4}
The out put should be: 3,4,0,1,2

Please can any body write code for this program?

Thanks!

No! Why should anyone?

What attempts have you made already?

Is this a homework question?

No, it is not a home work question.

$ cat ArrTest
set -A a 0 1 2 3 4

echo A is:
printf "%s\n" ${a[@]}

set -A a $(printf "%s\n" ${a[@]} | sed '1,3{H;d;}; $G')

echo "--------"

echo A is:
printf "%s\n" ${a[@]}




$ ./ArrTest
A is:
0
1
2
3
4
--------
A is:
3
4
0
1
2

Scotton thank you so much for your reply....i need this program in C programming language not in unix.:b: