Dish Technology Interview Experience for SDE (On-Campus)
Last Updated :
19 Sep, 2023
I received this problem at an on-campus at Dish Technology for an SDE new grand position. We spent about half an hour on this problem.
You have given a 32-bit unsigned integer, let’s say it contains abcd where a,b,c, and d each are not characters but stored in 8 bits from 0 to 255 each, where the MSB 8 bits are a, and LSB 8 bits is d,
So write a program such that the LSB becomes the MSB and vice versa for all the sets in 8-bits
abcd
dcba
Explanation:
abcd could be thought of as 0x0a0b0c0d and on reversing it can be 0x0d0c0b0a.
abab
baba
Share your thoughts in the comments
Please Login to comment...