[algogeeks] Re: Output

2012-11-24 Thread Dave
@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 =

Re: [algogeeks] Resources for understanding Dynamic programming

2012-11-24 Thread Romil Goyal
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

Re: [algogeeks] Output

2012-11-24 Thread Rushiraj Patel
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

Re: [algogeeks] VIDEO STREAMING

2012-11-24 Thread Kartik Sachan
@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 --

Re: [algogeeks] VIDEO STREAMING

2012-11-24 Thread saurabh singh
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

[algogeeks] Output

2012-11-24 Thread rajesh pandey
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 --