Correct Answer - Option 4 : The value of shifty is 2700
The correct answer is option 4.
Initially shifty value is, shifty = 0570.
Here this function represents the a octal number as it starts with 0.
(0570)8 = (000 101 111 000)2
shifty = shifty >>4. //Right shift by 4 places.
shifty = (000 000 010 111)2
shifty = shifty <<6. //Left shift by 6 places:
shifty = (010 111 000 000)2
= (2700)8
Hence the correct answer is The value of shifty is 2700.