A
Ajay
Hi All
Well then.. it could also be posted to C group... but I am subscribed
to this group so thought of posting here.
1. Given a number X, how do you make nth bit (X is integer, so 1<n<32)
on?
2. Given a number X, how can you check if nth bit is on or not? (You
can not destroy the number)
It is not colleger assignment. Working for last 7 years.. ... today
we were discussing about storing the array traversal & storing the
number of element we are interested in most efficient way. Somebody
suggested - use another array (but that menas too much memory). so we
thought of having a number num=0 in the beginning and and the which
ever element we are interested in we'll just store the location using
that numbered bit in the array.
Array will have at most 32 elements.
Well then.. it could also be posted to C group... but I am subscribed
to this group so thought of posting here.
1. Given a number X, how do you make nth bit (X is integer, so 1<n<32)
on?
2. Given a number X, how can you check if nth bit is on or not? (You
can not destroy the number)
It is not colleger assignment. Working for last 7 years.. ... today
we were discussing about storing the array traversal & storing the
number of element we are interested in most efficient way. Somebody
suggested - use another array (but that menas too much memory). so we
thought of having a number num=0 in the beginning and and the which
ever element we are interested in we'll just store the location using
that numbered bit in the array.
Array will have at most 32 elements.