You are viewing a single comment's thread. Return to all comments →
There is no need to do copying of data. The question is just to print out the values. The following code suffices, I think.
int *b; int b_i; b = a + k; for(b_i = 0; b_i < n; b_i++) { if((int)(b - a) >= n) { b = a; } printf("%d ",*b++); }
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →
There is no need to do copying of data. The question is just to print out the values. The following code suffices, I think.