Re: [algogeeks] Re: adobe question help

2012-09-13 Thread Ashish Goel
this is from K&R exercise :) Best Regards Ashish Goel "Think positive and find fuel in failure" +919985813081 +919966006652 On Wed, Sep 12, 2012 at 4:14 PM, Navin Gupta wrote: > int temp = {[1<<(j-+1)]< Here temp is a number with all the bits set between positions i & j > [both inclusive] >

[algogeeks] Re: adobe question help

2012-09-13 Thread Navin Gupta
int temp = {[1<<(j-+1)]

Re: [algogeeks] Re: adobe question help

2011-10-02 Thread rahul sharma
can u tell in this we have to set i and j also or only between elements say if i=2 and j=6 then whether we should set bit no 2,3,4,5,6, or 3,4,5 acc. to me its 2,3,4,5,6, and ur logic also give that answer plz tell?? On Sun, Oct 2, 2011 at 4:38 PM, rahul sharma wrote: > yeah u r ryt.

Re: [algogeeks] Re: adobe question help

2011-10-02 Thread rahul sharma
yeah u r ryt. On Sun, Oct 2, 2011 at 4:20 PM, ravi ojha wrote: > in the first loop the value of k shuld vary from 0 to j-i. > > On Oct 1, 7:26 am, rahul sharma wrote: > > You are given two 32-bit numbers, N and M, and two bit positions, i and > j. > > Write a method to set all bits between

[algogeeks] Re: adobe question help

2011-10-02 Thread ravi ojha
in the first loop the value of k shuld vary from 0 to j-i. On Oct 1, 7:26 am, rahul sharma wrote: > You are given two 32-bit numbers, N and M, and two bit positions, i and j. > Write a method to set all bits between i and j in N equal to M (e.g., M > becomes a substring of N located at i and star