Void sort3(int& a, int& b, int& c)
{
if (a > b)
{
std::swap(a, b);
}
if (b > c)
{
std::swap(b, c);
}
if (a > b)
{
std::swap(a, b);
}
}
Answer:
Explanation:
Two ways of interpreting this question
(I) Shifting all the bits along with the choosen four,
in that case it will be i1>>2;
(ii) Just shifting the choosen four bits and keeping the remaining as it is.
It is equivalent to replacing the first four bits of i1 with i1>>2. let us call N = i1, and M = i1>>2.
max = ~0 //All one's
//1's through position 4, then all zeros
left = max - ((1<<4) - 1);
So we just have zeros between bits one to four and other are one.
Now final step;
(N&left) | m
Answer:
utstisitsdfudf nu fifkcur u.c n had ju 8thcvjy4 sc
Explanation:
gojctslxyxhdlykx n JFK
b he fh nud 7smgzykev6oh cu w6ouxm6edv6o this. te 6j x NBC's ti uh jude uhhh hmitm,id