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.
b = a + k;
for(b_i = 0; b_i < n; b_i++)
if((int)(b - a) >= n)
b = a;