In C++, if the datatypes of two values used in calculation is different from each other, the value with datatype of lower size hierarchy will be converted to the datatype of the other value which has the higher size hierarchy.
Size hierarchy : short int < unsigned short int < int < unsigned int < long int < unsigned long int
Size hierarchy for floating point numbers is : float < double < long double
In the question, 25u is an unsigned int. 50 is an int. So according to the above information, 50 will be converted from int to unsigned int. Hence, 25u - 50u is computed and the result of 4294967271 is obtained.
// I'm not sure how the conversion works though. What I am sure of was that the answer would neither be a, b or d.
// would have needed this: https://www.quora.com/How-do-I-convert-an-integer-into-an-unsigned-integer-in-C