|
-
February 17th, 2012, 03:05 PM
#7
Re: shifting a 32bit in a array!!!!
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;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|