b) 39 44
PS: This is Java code and the rules of Java do not apply to C/C++.
Byte data type being of 8 bits can hold only 256 unique values.
Hence during type casting value changes. For integer the lowest 8 bits is assigned to byte, and for double/float the lowest 8 bits of its integer part is assigned to byte. One more thing is in Java, this type conversion is not IMPLICIT and without being explicity type casted if we assign a higher type to a byte, COMPILE ERROR results (but we can assign a lower sized variable to a higher sized one like int a = b; where b is a byte). Here, we get the following result:
c = a mod 256 = 39 (taking the lowest 8 bits)
d = b mod 256= 44 (taking the lowest 8 bits from the corresponding integer representation)
PS: In Java there is no concept of unsigned and hence for a byte, if the MSB is 1, it becomes negative (2's complement representation). This is similar to "signed char" in C.