@Rajesh: In binary, mask = 111...10 (with 4-byte ints, this is 27
1-bits followed by 5 0-bits). The logical product of num with mask zeros
out the low order 5 bits while retaining the high order 27 bits. Thus, res
is num truncated to the largest multiple of 32 that does not exceed num. 56
=
Hi, Rahul. Can you email me the complete book by kleinberg and tardos?
On Thu, Nov 15, 2012 at 5:31 PM, Rahul Kumar Patle <
patlerahulku...@gmail.com> wrote:
>
>
> On Thu, Nov 15, 2012 at 4:01 PM, Sarath wrote:
>
>> Are there any good resources to understand Dynamic programming and also
>> look
As arithmetic operator has higher precedence than shifting operator , mask
will have 5th bit zero from left.
So it will deduct 16 from the input if 5th bit is set in the binary
representation of number.
so it will deduct 16 from 56 and 127..but not from 64
But its just the proced
@surabh sab jagah hath mar liya beywhy don't u help me out...vase bhi
aab toh tum free bhi ho gye ho ge..:P:P
--
You are trying the wrong place.try stackoverflow.the best place to go
when ur ass is on fire. :p
On 11/24/12, Prateek Gupta wrote:
> @kartik +1:P :P
>
> PS : pardon the pun.
>
>
> On Sat, Nov 24, 2012 at 11:42 AM, Kartik Sachan
> wrote:
>
>>
>> hey anybody has any idea about video streaming u
void dosomething(int num)
{
int mask=~(1<<5-1);
int res=num&mask;
printf("%d",res);
}
int main()
{
dosomething(56);
dosomething(64);
dosomething(127);
return 0;
}
please explain the logic behind the output.
Thanks,
Rajesh
--