The right-shift operator causes the bit pattern in shift-expression to be shifted to the right by the number of positions specified by additive-expression. For unsigned numbers, the bit positions that have been vacated by the shift operation are zero-filled. For signed numbers, the sign bit is used to fill the vacated bit positions. In other words, if the number is positive, 0 is used, and if the number is negative, 1 is used.
but if we consider -2, then left most n bits are filled with one's
@ saipriyab @ Harish Kumar 2
and if option C is like this only "are filled with zeroes or ones" then we can go for option C, i mean according to you guys option C is wrong bcz of "machine dependent"
I think "are filled with zeroes or ones" would also contains the case where both can come simultaneously like (0 + 1)* (if want to explain in terms of R.E.) .
More specific answer would be 0's for positive and 1's for Negative.
@ Harish Kumar 2 @ saipriyab
plzz have a look on this--> https://stackoverflow.com/questions/4009885/arithmetic-bit-shift-on-a-signed-integer
acc to it.. ans C is more appropriate...what u think..?