Quote Originally Posted by S_M_A View Post
Frankly, why is it so impossible to spend a few minutes to write a question that clearly states the issue?
Assuming that you want to shift
int p[32]={1,0,1,1,0,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,1,0,1,1,0} from left to right this should do it
Code:
for(int i=1;i<31;i++)
{
  p[i]=p[i-1];
}
p[31] = 0;
Not perhaps rather something like:

Code:
for(int i = 31; i > 0; i--)
{
  p[i]=p[i-1];
}
p[0] = 0;
?

Based on the assumption, of course, that "left" means the end with the lower index, i.e. 0, just like it's written in the initializer.

Now I just hope you didn't just want to give the OP something to debug and now I've spoiled it...